> ## Documentation Index
> Fetch the complete documentation index at: https://enhancedradar.com/docs/api/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Error response format and HTTP status codes returned by the Enhanced Radar API.

Error responses are JSON:

```json theme={null}
{"data": null, "error": "<message>"}
```

Read `error` for the reason. Every response carries an `X-Request-ID` header; include it when you report a problem to [support@enhancedradar.com](mailto:support@enhancedradar.com).

## Status codes

| Status | Meaning |
| - | - |
| `400` | A parameter is missing or invalid. `error` says which. |
| `401` | The `Authorization` header is missing, or the key is invalid, revoked, or expired. Body `{"data": null, "error": "unauthorized"}`. |
| `402` | The organization's balance does not cover the request. Nothing is returned or charged. `error` says how much was needed and how much is available, in US dollars. See [Billing](https://enhancedradar.com/docs/api/docs/api/concepts/billing.md). |
| `403` | The key lacks the permission the route requires (body `{"data": null, "error": "forbidden"}`), the charge would go over a limit of the organization's account tier (`error` starts with `account tier limit reached`), or the key is not owned by an organization. Nothing is returned or charged. |
| `500` | The request failed on our side. Retry later. |
| `503` | The key could not be validated because the authentication provider is unavailable. Retry later. |

Some routes return additional codes, such as `404` for an unknown id, `502` on [`POST /api/v0/answers`](https://enhancedradar.com/docs/api/docs/api/api-reference/answers/create), and `504` on [`GET /api/v0/pireps`](https://enhancedradar.com/docs/api/docs/api/api-reference/pireps/search). Each endpoint page lists them.

## WebSocket errors

On [`GET /api/v0/live`](https://enhancedradar.com/docs/api/docs/api/api-reference/live/connect), the upgrade request returns `401` or `403` as above. After the connection opens, problems are reported as `error` messages and the connection stays open. When a charge for an update is refused, the server ends that subscription with an `unsubscribed` message that carries `error`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.