Previous Page Arrow Next Page Arrow

10.4 Delete Error Handling

The SData provider MUST return one of the following HTTP status codes:

Code Description
200 OK DELETE was successful. Resource has been deleted. Response body is empty.
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 delete 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 has already been deleted. The consumer SHOULD treat this as a success code (would be nice if HTTP had a 20x Already Deleted code).
412 Precondition Failed The If-Match header was provided but does not match the ETag 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> and in the 410 case which is considered as a success for the delete operation.  See Error Payload section for details.

SData providers MUST return errors as described above

Previous Page Arrow Next Page Arrow