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
| Field | Description |
|---|---|
category | The high-level category of the error. |
code | The specific error code. |
detail | A human-readable explanation for debugging. Do not show it to end users. |
field | The request field the error refers to, if any. |
Categories
| Category | Typical HTTP status |
|---|---|
INVALID_REQUEST_ERROR | 400 |
AUTHORIZATION_ERROR | 401 / 403 |
RATE_LIMIT_ERROR | 429 |
API_ERROR | 4xx / 5xx |
INTERNAL_SERVER_ERROR | 500 |
Codes
| Code | Meaning |
|---|---|
BAD_REQUEST | The request is malformed. |
INVALID_FIELDS | One or more fields have invalid values. |
MISSING_REQUIRED_PARAMETER | A required field is missing. |
UNEXPECTED_VALUE | A field contains a value that isn't allowed. |
UNAUTHORIZED | The token is missing, invalid or expired. |
TOO_MANY_REQUESTS | You exceeded the rate limit. Retry with exponential backoff. |
INTERNAL_SERVER_ERROR | Something went wrong on DRUO's side. Retry later. |

