> For the complete documentation index, see [llms.txt](https://protectedseas.gitbook.io/navigator-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://protectedseas.gitbook.io/navigator-api-docs/conventions/errors.md).

# Errors

All endpoints return structured JSON error responses with a single `error` field describing the problem:

```json
{ "error": "Description of the problem and accepted values." }
```

## Status codes

| Status | Meaning               | When it happens                                                                                                                                     |
| ------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400`  | Bad Request           | Invalid or missing parameters. The message includes the invalid value and, where applicable, the accepted values.                                   |
| `404`  | Not Found             | The requested site or region does not exist. The message echoes back the identifier that was provided.                                              |
| `500`  | Internal Server Error | An unexpected server-side error. Returns a generic message without exposing internal details (for example, `{ "error": "Database query failed" }`). |

Each endpoint validates its own parameters — see the individual endpoint pages under **API reference** for the specific parameters that are checked and the exact error triggers.
