Error Response

A standardized error format is returned in the body of the response whenever there is an error while fulfilling the request. This is accompanied by the response status code, which provides additional insight.

The standard error response is comprised of 4 components:

  • Reference – A unique string used as reference for the request and error. This should be provided in support requests to help more quickly identify the information pertaining to the request in question.
  • Code – A generic classification pertaining to the error message.
  • Message – An error message related to the code.
  • Details – Optional. Either a list or key-value map (dictionary) of more detailed information pertaining to the error(s). For example, this may give a more detailed list of error messages or could be a map of field name(s) to error(s).

Example JSON Error Response Body:

{

"reference": "25b414f0-7a1d-4f35-ac3c-0ec9886cf37a", "code":
        "VALIDATION_ERROR",

"message": "Invalid input.", "details": {

"reason_code": "Invalid Reason code"

}

}

Example XML Error Response Body:

<?xml version="1.0" encoding="utf-8"?>

<error>

<reference>25b414f0-7a1d-4f35-ac3c-0ec9886cf37a</reference>

<code>VALIDATION_ERROR</code>

<message>Invalid input.</message>

<details>

<reason_code>Invalid Reason code</reason_code>

</details>

</error>

Unhandled Errors

It is possible that the application is unable to convey the nature of the problem back to the requester. In these scenarios, the server will respond with a 500 (“Server Error”) status code and an accompanying message.