9.5 Update Error Handling
The SData provider MUST return one of the following HTTP status codes:
| Code | Description |
|---|---|
| 200 OK | PUT was successful. Resource has been updated. Response contains the modified <entry>. |
| 400 Bad Request | Generic status for consumer side error. Client MUST modify the request before resubmitting. |
| 401 Unauthorized | Request requires user authentication. See Authentication section for details. |
| 403 Forbidden | Consumer is not authorized to update the resource. |
| 404 Not Found | One of the elements specified in the URL does not exist. For example, application name, contract name, or resource kind. |
| 410 Gone | The resource existed in the past but has been deleted. |
| 412 Precondition Failed | The If-Match header was provided but does not match the state of the resource on the provider side. |
| 500 Internal Server Error | Serious provider error. Client SHOULD NOT retry the request. |
| 503 Service Unavailable | Transient provider error. Client MAY retry the request. The provider SHOULD include a Retry-After header in its response to indicate when the consumer MAY retry the request. |
When the service returns a 4xx or a 5xx status code, it SHOULD include an <sdata:diagnoses> payload with details about the error in its response, except in the 412 case where it returns an <entry>. See Error Payload section for details.
SData providers MUST return errors as described above.


