-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Support Error Code #1282
Comments
Can you give an example that knowing the keyword that produced the error doesn't solve that an error code would? (I realize that "keyword" isn't a property in the output unit, but check out #1249, which restructures the output unit so that the keyword is actually the key in an |
The motivation here is to depend on a pre-defined(provided in spec) set of error codes rather than implementation specific error language(English) dependent details. In the new format too, the usage of detailed string instead of code(numeric/short string) is prone to the above issue. Doubts wrt new format:
|
Again, what's the difference between an "error code" and just using the keyword. (Asked another way, what if the error code was the keyword?)
Yes, keywords only result in a single type of reportable error (at least so far as we've seen). Theoretically, a vocabulary could be created which defines a keyword that could fail in multiple ways, but such a thing is generally advised against.
If you want to only look at the keys, then that's fine, but having human-readable messages from implementations (and especially being able to customize them) is frequently requested. We won't standardize error message wording, but we definitely can require (or strongly suggest) that an implementation provide one or provide means for clients to define their own. (My implementation allows customization and even internationalization.)
Effectively, for the |
This should work out for our use case. Thanks @gregsdennis . Shall I close this issue? |
Since the original filer suggested closing this almost a month ago with no further commentary, I'm going to go ahead and close it. It looks like the discussion is resolved to me. |
Since error messages are not standardised across implementations, it is difficult to share the exact error. Moreover, these error messages can change over time(depending on the library), thus, introducing breakages in implementations. Such breakages can break translations, formatting, etc for the end user.
Example: Server validation output format being passed to client validator.
Suggestions:
error
node in output format can point to error code instead of the message.title
anddescription
annotations can be used to add more details of the error.Prior art:
The text was updated successfully, but these errors were encountered: