---
title: Errors
description: Every error is a problem document, as RFC 9457 defines it, with a stable code to branch on.
---

When a request fails, the API answers with an HTTP status and a problem document ([RFC 9457](https://www.rfc-editor.org/rfc/rfc9457)), served as `application/problem+json`:

```json
{
  "type": "unauthenticated",
  "code": "unauthenticated",
  "status": 401,
  "title": "Unauthorized"
}
```

| Field    | What it holds                                            |
| -------- | -------------------------------------------------------- |
| `code`   | The error, as a stable identifier. Branch on it.         |
| `type`   | The problem type RFC 9457 asks for.                      |
| `status` | The HTTP status of the response.                         |
| `title`  | A short summary of the status, for logs.                 |
| `detail` | When present, what went wrong in this request, for logs. |

`title` and `detail` are for people reading logs: their wording can change, so never branch on them.

## Codes

| Status | Code                    | When                                                    |
| ------ | ----------------------- | ------------------------------------------------------- |
| 400    | `parse`                 | The request body is not valid JSON.                     |
| 401    | `unauthenticated`       | The request carries no API key, or one the API refuses. |
| 403    | `forbidden`             | The key lacks the permission the route needs.           |
| 404    | `not-found`             | No route answers at this path.                          |
| 409    | `conflict`              | The request clashes with data that already exists.      |
| 422    | `validation`            | A parameter or field breaks the route's schema.         |
| 422    | `invalid-cursor`        | The cursor is not one the list returned.                |
| 500    | `internal-server-error` | The API failed. Retry later; the failure is reported.   |

Each route's page in the [API reference](/reference) lists the statuses it can answer.
