Previous Page Arrow Next Page Arrow

12.5 Named Query Error Handling

The SData provider MUST return one of the following HTTP status codes when responding to a named query request:

Code Description
200 OK Operation completed successfully (synchronously or asynchronously).
202 Accepted An asynchronous operation was accepted.  Or is in progress if this is a tracking request. A Location header with the tracking URL MUST be returned. The payload MUST be an <sdata:tracking> payload. See Tracking Payload section.
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 start the operation.
404 Not Found One of the elements specified in the URL does not exist. For example, application name, contract name or query name.
410 Gone The resource has already been deleted. This MAY be returned in an asynchronous invocation when deleting the tracking resource.
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 410 case, which is a success code. See Error Payload section for details.


Previous Page Arrow Next Page Arrow