-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errorcode in error data object #98
Comments
Added to todo list https://github.com/PHPAuth/PHPAuth/wiki/Todo-list |
Any formats that you want to follow? Or can I start at the top and define numbers? |
Probably they should be numbers grouped by their family (system_error from 0 to 100, login errors from 101 to 200 and so on) like http error codes, but I am open to other solutions. The only requirement is they are unique IMHO. |
status? |
Currently errors are handled returning an object with a boolean value 'error' and a string 'message'.
The message in case of generic error contains also an error code at the end.
I suggest adding to the object response a string 'code', unique for each error.
So one can override the message error or forward to a specific page.
Very useful also when using ajax.
The text was updated successfully, but these errors were encountered: