# Errors

A refusal is a status code and a JSON body in one shape:

```json
{ "error": { "code": "conflict", "message": "VERSION_MISMATCH: the file changed since you read it", "details": { } } }
```

- `code` is one of the codes below, and is what a program should branch on.
- `message` is a sentence for a person, and can change between releases.
- `details` is present only for a refusal whose message is itself a JSON document, such as a quote that matches more than once and the candidates it matched. It is the same document, already parsed.

## Status codes

| Code | Status |
|---|---|
| `invalid_argument` | 400 |
| `forbidden` | 403 |
| `not_found` | 404 |
| `conflict` | 409 |
| `too_large` | 413 |
| `limited` | 429 |
| `unavailable` | 503 |
| `internal` | 500 |

Two more answers come before an operation runs. An unusable credential is `401` with the code `unauthenticated` (see [Authentication](/docs/authentication)), and an address under `/v1` that names no route is `404` with `not_found`.

An argument that fails its operation's schema is `400 invalid_argument`, and the message names the argument at fault. An argument the operation does not take is refused the same way rather than ignored.
