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

# Class: ErrorMappingInterceptor

> ErrorMappingInterceptor in the Terminal49 TypeScript SDK maps non-2xx HTTP responses to typed Terminal49Error subclasses like RateLimit and ValidationError.

# Class: ErrorMappingInterceptor

## Constructors

### Constructor

> **new ErrorMappingInterceptor**(): `ErrorMappingInterceptor`

#### Returns

`ErrorMappingInterceptor`

## Methods

### onResponse()

> **onResponse**(`__namedParameters`): `Promise`\<`Response`>

#### Parameters

| Parameter           | Type                                                                  |
| ------------------- | --------------------------------------------------------------------- |
| `__namedParameters` | `Pick`\<`MiddlewareCallbackParams`, `"id"` \| `"request"`> & `object` |

#### Returns

`Promise`\<`Response`>
