> For the complete documentation index, see [llms.txt](https://docs-unified.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-unified.crypto-chief.com/getting-started/errors.md). Agents can also search and read this documentation through its [MCP server](https://docs-unified.crypto-chief.com/~gitbook/mcp).

# Errors

## Errors

Every failure comes back in one shape:

```json
{
  "error": "HISTORY_OUT_OF_COVERAGE",
  "message": "BSC_TESTNET history covers the last 200000 blocks",
  "request_id": "req_01JDX9K8P2M4N6Q8R0T2V4W6Y8",
  "details": { "network": "BSC_TESTNET", "history_from": "61800000" }
}
```

| Field        | Meaning                                                                                   |
| ------------ | ----------------------------------------------------------------------------------------- |
| `error`      | Machine-readable code. Branch on it                                                       |
| `message`    | For a human reading a log; may be reworded                                                |
| `request_id` | Equal to the `X-Request-Id` header; quote it to support                                   |
| `details`    | Optional context: `network`, `capability`, `history_from`, `safe_height`, `max`, `reason` |

A failure of one network in a multi-network request is not an error response: the request answers `200` and reports that network in `networks[]` ([Partial Responses](https://docs-unified.crypto-chief.com/getting-started/partial-responses.md)).

### Full list

#### Access

| Status | Code                   | What happened                                    | What to do                          | Charged |
| ------ | ---------------------- | ------------------------------------------------ | ----------------------------------- | ------- |
| `401`  | `UNAUTHORIZED`         | No key, an unknown key, or a frozen project      | Check the project UUID              | No      |
| `402`  | `INSUFFICIENT_CREDITS` | The prepaid balance will not cover the call      | Top up                              | No      |
| `403`  | `DOMAIN_NOT_ALLOWED`   | The project's domain allow-list refused the call | Add the domain, or call server-side | No      |
| `403`  | `IP_NOT_ALLOWED`       | The project's IP allow-list refused the call     | Add the calling IP                  | No      |

#### The request

| Status | Code                      | What happened                                                                                                                        | What to do                                                                                                                                                | Charged |
| ------ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `400`  | `INVALID_REQUEST`         | Malformed body, unknown parameter, wrong type, unknown `include` value, a value out of range                                         | Read `message`. Not fixed by retrying                                                                                                                     | Yes     |
| `400`  | `INVALID_ADDRESS`         | The address is valid on none of the requested networks                                                                               | Check the address and `networks` with [`GET /v1/addresses/{address}`](https://docs-unified.crypto-chief.com/api-reference/addresses.md)                   | Yes     |
| `400`  | `UNKNOWN_NETWORK`         | No such network code or CAIP-2 alias                                                                                                 | See [Networks and Identifiers](https://docs-unified.crypto-chief.com/getting-started/networks-and-identifiers.md)                                         | Yes     |
| `400`  | `CURSOR_MISMATCH`         | The cursor was issued for other parameters                                                                                           | Send the parameters of the first page                                                                                                                     | Yes     |
| `400`  | `INVALID_TRANSACTION`     | Broadcast: the transaction cannot be decoded, or the network rejected it; the network's reason is in `details.reason`                | Fix the transaction; do not resend it unchanged                                                                                                           | Yes     |
| `404`  | `NOT_FOUND`               | The network confirmed that the transaction, block, asset, NFT, xpub or name does not exist                                           | —                                                                                                                                                         | Yes     |
| `409`  | `SNAPSHOT_REORGED`        | A block of the pagination's snapshot was reorganized; `details.network`, `details.safe_height`                                       | Start a new pagination from `safe_height` ([how](https://docs-unified.crypto-chief.com/getting-started/pagination-and-snapshots.md#409-snapshot_reorged)) | Yes     |
| `410`  | `CURSOR_EXPIRED`          | The cursor is older than 24 hours                                                                                                    | Start again without a cursor                                                                                                                              | Yes     |
| `422`  | `UNSUPPORTED_CAPABILITY`  | The network does not offer the operation, the parameter, the stage or the `selection` field; `details.network`, `details.capability` | Check [`GET /v1/networks`](https://docs-unified.crypto-chief.com/api-reference/networks.md)                                                               | Yes     |
| `422`  | `HISTORY_OUT_OF_COVERAGE` | The range starts below the network's history; `details.history_from`                                                                 | Start at `history_from`                                                                                                                                   | Yes     |
| `422`  | `RANGE_TOO_LARGE`         | The block range is longer than the network allows; `details.max`                                                                     | Split the range                                                                                                                                           | Yes     |

#### Limits and availability

| Status | Code                     | What happened                                                           | What to do                                           | Charged  |
| ------ | ------------------------ | ----------------------------------------------------------------------- | ---------------------------------------------------- | -------- |
| `429`  | `RATE_LIMITED`           | The project is over its request limit                                   | Wait `Retry-After` seconds                           | No       |
| `500`  | `INTERNAL`               | The call failed on the API's side                                       | Do not retry unchanged; report the `request_id`      | Yes      |
| `503`  | `UPSTREAM_UNAVAILABLE`   | A data source of the network is unavailable or did not answer in time   | Wait `Retry-After` seconds and retry                 | Refunded |
| `503`  | `INDEX_LAGGING`          | The history index of the network is behind the height the request needs | Wait `Retry-After` seconds and retry                 | Refunded |
| `503`  | `PROVIDER_LIMIT_REACHED` | The monthly spending safeguard of an external data provider was reached | Retry after `Retry-After`, which points to the reset | Refunded |

### `404` against `503`

`404 NOT_FOUND` means the network's data source answered and the object is not there. A timeout, a gap in an archive or a lagging index is never a `404` and never an empty page: it is a `503`, or a `422` when the range is outside the network's history. On [`/status`](https://docs-unified.crypto-chief.com/api-reference/transactions.md#transaction-status), "not seen yet" is `200` with `status: "not_found"`, given only after the source has answered.

### Retrying

A retry of the same request can fix:

* `429 RATE_LIMITED`, after `Retry-After`;
* `503 UPSTREAM_UNAVAILABLE`, `INDEX_LAGGING`, `PROVIDER_LIMIT_REACHED`, after `Retry-After`;
* networks and batch items with `status: "error"`, after their `retry_after`.

Use backoff and a ceiling on attempts. A repeated read duplicates nothing, and a repeated [broadcast](https://docs-unified.crypto-chief.com/api-reference/transactions.md#broadcast-a-transaction) of the same `raw` returns the same answer.

Every other `4xx` needs a different request. A `500` is not a temporary failure: report it.

### Reporting a call

Send the `request_id` (or `X-Request-Id`), the method, the path with its query, and the body if there was one.
