Handle an exception
For the list of REST API exceptions, see Exceptions.
application/xml is requested, the exception is returned in XML format compatible with the Rest Exception Schema. See Schema Reference.
application/json is requested, the exception is returned in a JSON format string. The Id element refers to the exception type. The Title provides more specific information. The client handles REST exceptions by extracting the exception Id and Title and taking application-appropriate action.
If the ACCEPT header is a binary type, exceptions are returned in
text/html format. However, if an additional valid content type is requested, the error is returned according to the additional type. For example, for
application/octet-stream,application/xml, the exception is returned in XML format compatible with the Rest Exception Schema. For
application/octet-stream,application/json, the exception is returned in a JSON format string.