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

# Error handling

> Understand Neuron API error codes and how to handle them gracefully.

The Neuron API uses standard HTTP status codes and returns structured error objects to help you handle failures gracefully.

## Error response format

```json theme={null}
{
  "error": {
    "code": "invalid_request",
    "message": "The 'name' field is required.",
    "requestId": "abc123"
  }
}
```

## HTTP status codes

| Code  | Meaning                                             |
| ----- | --------------------------------------------------- |
| `200` | Success                                             |
| `201` | Resource created                                    |
| `400` | Bad request — check your request body or parameters |
| `401` | Unauthorized — invalid or missing API key           |
| `403` | Forbidden — insufficient permissions                |
| `404` | Not found — resource does not exist                 |
| `422` | Unprocessable entity — validation error             |
| `429` | Too many requests — rate limit exceeded             |
| `500` | Internal server error — contact support             |

## Rate limiting

If you exceed the rate limit, you'll receive a `429` response. The `Retry-After` header indicates how many seconds to wait before retrying.

## Retries

For transient errors (`500`, `503`), implement exponential backoff with jitter. Do not retry on `4xx` errors without fixing the underlying issue.
