# Errors

Every error is JSON with one field, `error`, a sentence that says what went wrong and what to do:

```json
{ "error": "There is no version 7." }
```

A `429` adds `resetsAt`:

```json
{ "error": "Quota reached for this period. It resets at 2026-10-24T00:00:00.000Z.", "resetsAt": "2026-10-24T00:00:00.000Z" }
```

## Statuses

| Status | When | What it says, for example |
| --- | --- | --- |
| `400` | A parameter is malformed, such as a version number or a branch name. | `seq must be a version number.` |
| `401` | No project key was sent, or it was revoked. | `Send a project key: Authorization: Bearer l10p_…` |
| `402` | You asked for an SDK on a plan without SDKs. | `SDKs come with Pro.` |
| `403` | Your plan doesn't include what you asked for, or the project is read-only. | `This project is read-only: the workspace has more projects than its plan includes.` |
| `404` | The version you named doesn't exist. | `This project has no versions yet.` |
| `409` | Another push landed at the same moment, or a docs push names a branch that isn't the docs branch. | `Another version was pushed at the same moment. Push again.` |
| `413` | The body is larger than your plan allows. | The size you sent and the most that's read. |
| `415` | A docs push isn't a gzipped tar. | `Send the docs as a .tar.gz with Content-Type: application/gzip.` |
| `422` | The body isn't an OpenAPI 3.0 or 3.1 document, has an external `$ref`, or has more operations than the registry takes. | What's wrong with the document. |
| `429` | A quota is reached. | The time it resets, in `resetsAt`, and a `Retry-After` header. |
| `503` | The registry can't be reached right now. | `The registry is unavailable right now. Try again later.` |

A project becomes read-only when the workspace has more projects than its plan includes, for example after a downgrade. Reading still works.

Each operation's own errors are listed in the [reference](https://docs.latitude10.tech/reference).

## Where this comes from

- `openapi/registry-v1.yaml`
- `app/api/registry/v1/_lib/route.ts`
- `app/api/registry/v1/versions/route.ts`
- `app/api/registry/v1/docs/route.ts`
- `app/registry/_lib/usage.ts`
- `app/registry/_lib/bundle.ts`
- `app/sdk/_lib/builds.ts`
