It is possible for a number of things to go wrong during the request processing. The various underlying causes are described by various HTTP status codes in the range 400-499 (for client side errors) or 500-599 (for server side problems). The description of each request type SHOULD list the possible status codes returned by that request type. If a response is returned with an error status code (400-499 or 500-599), the server SHOULD also return a response message body containing a messages data model, containing zero or more message data models, describing what went wrong. The text values of such messages might be used, for example, to communicate with a human user of the client side application.
Failure HTTP Statuses
A failure operation will result with a 4XX or 5XX status code which are described in the following table:The media type specified in the Accept header is not supported by the server. This will be the common response when the client resources version is no longer supported by the server.
The common successful flows are described in the diagram below:

HTTP Status | Description |
---|---|
400 Bad Request | The request could not be processed because it contains missing or invalid information (such as validation error on an input field or a missing required value.). |
401 Unauthorized | A request that created a new resource was completed, and no response body containing a representation of the new resource is being returned. A Location header containing the canonical URI for the newly created resource should also be returned. |
403 Unauthorized | The request has been accepted for processing, but the processing has not been completed. Per the HTTP/1.1 specification, the returned entity (if any) SHOULD include an indication of the request's current status, and either a pointer to a status monitor or some estimate of when the user can expect the request to be fulfilled. |
404 Not Found | The server fulfilled the request, but does not need to return a response message body. |
415 Unsupported Media Type | |
500 Internal Server Error | The server encountered an unexpected condition which prevented it from fulfilling the request. |