DRUO
Get started
Basics

Errors

Every failed request returns an errors array with machine-readable codes.

DRUO uses standard HTTP status codes: 2xx for success, 4xx for problems with the request, and 5xx for errors on DRUO's side. The body of a failed request contains an errors array with one or more Error objects.

json
{
  "errors": [
    {
      "category": "INVALID_REQUEST_ERROR",
      "code": "MISSING_REQUIRED_PARAMETER",
      "detail": "Field 'amount' is required.",
      "field": "amount"
    }
  ]
}

Error object

FieldDescription
categoryThe high-level category of the error.
codeThe specific error code.
detailA human-readable explanation for debugging. Do not show it to end users.
fieldThe request field the error refers to, if any.

Categories

CategoryTypical HTTP status
INVALID_REQUEST_ERROR400
AUTHORIZATION_ERROR401 / 403
RATE_LIMIT_ERROR429
API_ERROR4xx / 5xx
INTERNAL_SERVER_ERROR500

Codes

CodeMeaning
BAD_REQUESTThe request is malformed.
INVALID_FIELDSOne or more fields have invalid values.
MISSING_REQUIRED_PARAMETERA required field is missing.
UNEXPECTED_VALUEA field contains a value that isn't allowed.
UNAUTHORIZEDThe token is missing, invalid or expired.
TOO_MANY_REQUESTSYou exceeded the rate limit. Retry with exponential backoff.
INTERNAL_SERVER_ERRORSomething went wrong on DRUO's side. Retry later.