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

# Error Block

> Handling and normalizing provider failures.

The `error` block allows you to specify how upstream error statuses and payloads are transformed before reaching the client. Many providers rely on completely different HTTP error codes and body schemas for rate limits and payload limits.

## Syntax

```nginx theme={null}
error { 
  error_map <mode>; 
}
```

### Supported Mapping Modes (v0.1)

* **`openai`**: Normalizes the incoming error structure into the standard OpenAI `{"error": {"message": "...", "type": "..."}}` format.
* **`common`**: A broader normalization mode for widely-used REST API error shapes.
* **`passthrough`**: Bypasses the ONR error normalization engine completely, passing the raw upstream HTTP error headers and body straight through to the client.
