Status Codes
Every API MUST use the appropriate HTTP Status Codes to communicate the result of a request operation.
Every API designer, implementer and consumer MUST understand the semantic of the HTTP Status Code she is using.
At a minimum everyone MUST be familiar with the semantics of "Common" HTTP Status Codes.
Example
Use Codes 4xx or 5xx to Communicate Errors
The 4xx range concerns errors in the API Consumer/Client side, while 5xx range concerns errors in the upstream/backend service or the API implementation.
A request:
resulting in the 200 OK response when the requested resource (as identified by request URI) couldn't be found:
is not acceptable.
Instead
should be returned.
Recommended Reading
Last updated