---
url: /nestjs-odata/api/generated/interfaces/ODataErrorMapperContext.md
---
# Interface: ODataErrorMapperContext

Defined in: [response/odata-error.ts:41](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/response/odata-error.ts#L41)

Where the exception being mapped was thrown.

## Properties

### batch?

> `readonly` `optional` **batch?**: `object`

Defined in: [response/odata-error.ts:57](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/response/odata-error.ts#L57)

Set when the error comes from a `$batch` request: from one operation (`method`, `url`,
`contentId`), or from a changeset as a whole (`changeset: true`, no operation fields).

#### changeset?

> `readonly` `optional` **changeset?**: `boolean`

#### contentId?

> `readonly` `optional` **contentId?**: `string`

#### method?

> `readonly` `optional` **method?**: `string`

#### url?

> `readonly` `optional` **url?**: `string`

***

### host?

> `readonly` `optional` **host?**: `ArgumentsHost`

Defined in: [response/odata-error.ts:47](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/response/odata-error.ts#L47)

The Nest arguments host of the failing route, when the error is caught by
`ODataExceptionFilter` (also for a `$batch` operation, which runs through its own route).
Undefined for errors of the `$batch` request itself.

***

### request?

> `readonly` `optional` **request?**: `unknown`

Defined in: [response/odata-error.ts:52](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/response/odata-error.ts#L52)

The platform request: for a `$batch` operation, the operation's own request (the `$batch`
request is `getODataBatchPart()?.batchRequest`).
