api-guidelines
api-guidelines copied to clipboard
Determine guidance for top level error code mapping to HTTP status codes
Determine if top level error codes should map to HTTP status codes or be more granular. Provide a consistent set of guidance for our service team partners.
The OData v4 specification says:
The value for the code name/value pair is a language-independent string. Its value is a service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
There is no strict requirement that we follow OData to a tee here (we are clearly taking liberties in other areas), but the rationale as to what the value represents should carry over.