Handling Errors
DRUO API always return a response. If an endpoint request fails, the response body includes an errors array as explained in the following section.
DRUO API errors
When a request fails, DRUO endpoints return a response that includes the errors field in the body. It provides one or more errors of the Error type. The following is an example response of a failed CreatePayment
request:
Response
{ "errors": [ { "code": "UNEXPECTED_VALUE", "category": "INVALID_REQUEST_ERROR", "detail": "This field has not been found in our database.", "field": "funding_source_id" } ] }
Protocol status codes
DRUO endpoints use HTTP protocol status codes to indicate errors. For more information about HTTP response status codes, see HTTP response status codes. The error code values range from 400 to 599.