# Errors

The HTTP status tells you what happened: `2xx` for success, `422` for a request with a value the API can't accept, `404` when there is nothing at that address or no data for it, and `5xx` when the API itself failed. `400` is only for a request the API couldn't read at all, such as a body that isn't valid JSON.

Errors follow RFC 9457 (Problem Details for HTTP APIs) and are sent as `application/problem+json`:

- `status` is the HTTP status and `title` its standard phrase. `type` is always `about:blank`.
- `detail` says what went wrong with this request, and `instance` is the path and query that was requested.
- `error` is a short name for the problem. `message` is the same text as `detail`, and `success` is always `false`.
- When a parameter is rejected, `details` lists each problem with where it was found (`query`, `params` or `body`) and the name of the parameter.

The health endpoints are the exception: they report a `status` word such as `unhealthy`, in plain JSON.
