> Index of every page on this site: [llms.txt](https://docs.a-line.cloud/llms.txt)

# Errors

> The error envelope every non-2xx v1 response uses.

Every non-2xx response has the same JSON body:

```json api op=list_clusters status=429
{
  "error": {
    "code": "rate_limited",
    "message": "This API key made too many requests. Try again in 12 seconds.",
    "request_id": "0b7e4c1e-6f0a-4a57-9d5e-3f1a2b6c8d90"
  }
}
```

| Field        | Meaning                                                              |
| ------------ | -------------------------------------------------------------------- |
| `code`       | A stable, lowercase code. Match on this.                             |
| `message`    | Text for people. It may change, so do not match on it.               |
| `request_id` | The `x-request-id` of the request. Quote it when you contact support. |
| `details`    | Extra fields about the refusal, when there are any.                  |

## Codes

A response uses a specific code when one applies, such as
`api_key_scope_forbidden` (see [authentication](/api/authentication#refused)).
Otherwise the code follows the status:

| Status        | Code                 |
| ------------- | -------------------- |
| `400`, `422`  | `invalid_request`    |
| `401`         | `unauthenticated`    |
| `403`         | `forbidden`          |
| `404`         | `not_found`          |
| `405`         | `method_not_allowed` |
| `409`         | `conflict`           |
| `413`         | `payload_too_large`  |
| `429`         | `rate_limited`       |
| `5xx`         | `internal`           |

A `5xx` response always has the message `Internal server error` and no
`details`. Retry it later, and quote its `request_id` if it keeps failing.
