# Errors

A refused request answers a status and one sentence that says what was wrong and how to fix it:

```json
{"error": {"message": "invalid value — Amount: not a number"}}
```

| Status | Meaning |
| --- | --- |
| `400` | The request is wrong. The sentence names the field or column and what was wrong. |
| `401` | No key, or an unknown or revoked one. |
| `402` | The route needs a plan the workspace is not on. |
| `403` | The key was not given the scope this route needs — e.g. `this key was not given rows:write`. |
| `404` | Nothing at that id, or nothing this key may see. |
| `429` | Too many requests. Wait the `Retry-After` seconds. |
| `5xx` | Our side. Retry with backoff; quote the answer's `X-Request-Id` header to support. |

## Refused batches

A batch that is refused lists every bad item by its position, and writes nothing:

```json
{"error": {
  "message": "1 of 2 rows were refused and nothing was written — …",
  "errors": [{"index": 1, "message": "invalid value — Amount: not a number"}]
}}
```

## Malformed bodies

When the body itself can't be read, the refusal also carries `expected` — the shape the route takes —
so you can compare it with what you sent.
