> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> The error response shape, every error code, and which ones to retry.

Every error has the same body:

```json theme={null}
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests",
    "retryable": true
  }
}
```

Branch on `code`, not `message`. The message is for people and can change. When `retryable` is `true`, send the same request again after a short wait.

| Status | Code | What to do |
| - | - | - |
| `400` | `bad_request` | Fix the request body or parameters. The message says what's wrong. |
| `401` | `unauthorized` | Check the `Authorization` header. The token is missing, invalid, or expired. |
| `403` | `forbidden` | Add the endpoint's [scope](https://docs.decimal.app/api-reference/authentication.md#scopes) to the token. |
| `404` | `not_found` | Check the ID in the path. |
| `409` | `conflict` | The resource isn't in a state that allows this, for example a conversation that's still processing or already escalated. |
| `429` | `rate_limited` | Wait the `Retry-After` seconds, then retry. See [rate limits](https://docs.decimal.app/api-reference/rate-limits.md). |
| `500` | `internal_error` | Retry with backoff. If it keeps failing, [email support](mailto:support@getdecimal.ai) with the `Request-Id` header. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.