Provide Error Code along with error messages in output format
Closed this issue · 3 comments
jugaadi commented
As a library user, it would be helpful if jschon can provide numeric error codes( and name if possible) in addition to the error messages in output format since we may have to translate the same in other languages.
- Current
error
node can point to error code instead of the message. title
anddescription
annotations can be used to add more details of the error.
Prior art:
jugaadi commented
Additional context: json-schema-org/json-schema-spec#1282
marksparkza commented
I'm inclined to concur with Greg Dennis's view in the linked issue - that the keyword itself (which can be inferred from keywordLocation
) can effectively be taken to be the error code.
I do agree though that error messaging in jschon needs work, in terms of allowing customization and localization. I'll create a separate issue for this.
jugaadi commented
PS: The suggestions by Greg Dennis will only be reflected in the next version of JSON Schema.