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

# Error Handling

> Response envelopes, error codes, and how to handle failures.

## Response envelopes

**Success:**

```json theme={null}
{
  "status": true,
  "message": "Order created",
  "data": { }
}
```

**Error:**

```json theme={null}
{
  "status": false,
  "code": "E_VALIDATION_ERROR",
  "message": "Exactly one of from.amount or to.amount must be provided"
}
```

Some authentication failures use `"status": "failed"` on HTTP 401/403.

## HTTP status mapping

| Status | Meaning          | Action                            |
| ------ | ---------------- | --------------------------------- |
| `200`  | Success          | Process `data`                    |
| `400`  | Bad request      | Fix payload                       |
| `401`  | Unauthorized     | Check credentials / signature     |
| `403`  | Forbidden        | KYB not approved, or IP whitelist |
| `404`  | Not found        | Verify reference                  |
| `422`  | Validation error | Fix fields                        |
| `429`  | Rate limited     | Retry with backoff                |
| `5xx`  | Server error     | Retry with idempotency            |

## Common error codes

| Code                 | Context                   |
| -------------------- | ------------------------- |
| `E_VALIDATION_ERROR` | Request failed validation |
| `E_UNAUTHORIZED`     | Invalid credentials       |
| `E_IP_BLOCKED`       | IP not on whitelist       |
| `E_RATE_LIMITED`     | Rate limit exceeded       |
| `E_NOTFOUND`         | Resource does not exist   |

See [Error reference](/resources/errors).

## Production patterns

1. Log `code`, `message`, and your `merchant_reference`
2. Do not retry `4xx` except `429`
3. Treat timeouts as ambiguous — query by `merchant_reference` before creating another order

## Related

* [Retries](/concepts/retries)
* [Idempotency](/concepts/idempotency)
