> For the complete documentation index, see [llms.txt](https://docs.dexpal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dexpal.io/for-partners/schemas/error.md).

# Error

All errors return a consistent envelope with `success: false`.

## Schema

```json
{
  "success": false,
  "error": "Human-readable description of the error"
}
```

## HTTP Status Codes

| Status                      | When                                           |
| --------------------------- | ---------------------------------------------- |
| `400 Bad Request`           | Missing or invalid query parameters            |
| `401 Unauthorized`          | Missing or invalid API key                     |
| `404 Not Found`             | Resource does not exist (e.g. unknown address) |
| `429 Too Many Requests`     | Rate limit exceeded                            |
| `500 Internal Server Error` | Unexpected server-side error                   |

## Examples

```json
// 400
{
  "success": false,
  "error": "Missing required parameter: addr"
}
```

```json
// 401
{
  "success": false,
  "error": "Invalid or missing API key"
}
```

```json
// 429
{
  "success": false,
  "error": "Rate limit exceeded. Try again in 30 seconds."
}
```

## Notes

* Never return a `200` status with `success: false`. Use the appropriate HTTP status code.
* Do not expose internal stack traces or implementation details in the `error` field.
