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

# Errors

> The error envelope, and what to branch on.

Every error the API produces carries the same envelope:

```json theme={null}
{
  "error": {
    "code": "origin_not_allowed",
    "message": "This origin is not on the key's allowlist."
  }
}
```

Branch on `code`. `message` is for logs and debugging — its wording can change
at any time.

Each operation lists the codes it can return. Treat those lists as open: a new
code can appear under an existing status, so fall back to the status when you
meet one you don't recognise.

Some failures arrive without the envelope — a `400` on a body that isn't
parseable JSON, a `413` on an oversized body, a `504` on a timeout. Read the
HTTP status before you parse the body.
