We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
At the moment, an error is rendered like this:
{ "type": "field-validation-error", "message": "An error message", "field": "email" }
The fields have the following meaning:
type
message
field
field-validation-error
There are some drawbacks on this approach:
What to do:
A possible format could be:
{ "id": "email-format-error", "type": "field-validation-error", "message": "The given email format is incorrect", "details": [ { "key": "email", "value": "[email protected]" }, { "key": "field", "value": "email" } ] }
This error format removes the drawbacks, whether to use key/value objects on the arguments or just a map is another thing to consider.
key/value
arguments
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How it works
At the moment, an error is rendered like this:
The fields have the following meaning:
type
-> the type of error, or error category (mandatory).message
-> a user friendly message rendered on the user language (mandatory).field
-> this exists only because the type isfield-validation-error
.How to improve it
There are some drawbacks on this approach:
What to do:
A possible format could be:
This error format removes the drawbacks, whether to use
key/value
objects on thearguments
or just a map is another thing to consider.The text was updated successfully, but these errors were encountered: