Errors will be returned in a format containing:
- Error Message ("errorMessage")
- Unique Error ID ("errorId")
- HTTP Error Code ("errorCode")
- A timestamp of the time the error occurred ("timestamp")
For example, this is an error returned when supplying inputs with different root elements:
If set, the error will be returned in the content type specified in the
Accept header of the request.
E.g. if there was an error getting a Job's information and you set
application/json, it will be returned in JSON format.
Accept header is set, and you posted XML or JSON inputs, it will return in the content type of your inputs.
For example, posting a comparison in XML with incorrect file paths will return something like this (stack trace cut down for readability):
If neither of those previous conditions are set (e.g. no
Accept header and posted a comparison using
multipart/form-data ) it will fallback to XML format.