Open msporny opened 1 month ago
We might want to limit the number of error codes to higher level categories, similar to what is seen here:
https://developer.mozilla.org/en-US/docs/Web/API/DOMException#error_names
So that we don't have a new error code for every possible, individual error.
I think we should be mindful of what we can define that would make testing these features convenient (test software will need something to assert a response on when providing a bad input) while also not making the specification too rigid. This aligns with the comment made by @dlongley.
The API has the capability of returning ProblemDetail errors today but does not define error codes itself (many of the codes come from the VCDM or status list specifications). It was suggested that the API should define and throw some error codes that are specific to the API such as "UNKNOWN_OPTION_PROVIDED" when an unknown option is provided to an API call.