---
url: /nestjs-odata/api/generated/classes/ODataValidationError.md
---
# Class: ODataValidationError

Defined in: [query/odata-validation.error.ts:17](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/query/odata-validation.error.ts#L17)

Thrown when field name validation fails against the EdmRegistry.

The `entityTypeName` and `propertyName` fields provide diagnostic context
for the user's own query (not internal server data).

## Extends

* `Error`

## Constructors

### Constructor

> **new ODataValidationError**(`message`, `entityTypeName`, `propertyName`, `availableProperties?`): `ODataValidationError`

Defined in: [query/odata-validation.error.ts:18](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/query/odata-validation.error.ts#L18)

#### Parameters

##### message

`string`

##### entityTypeName

`string`

##### propertyName

`string`

##### availableProperties?

readonly `string`\[]

#### Returns

`ODataValidationError`

#### Overrides

`Error.constructor`

## Properties

### availableProperties?

> `readonly` `optional` **availableProperties?**: readonly `string`\[]

Defined in: [query/odata-validation.error.ts:22](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/query/odata-validation.error.ts#L22)

***

### entityTypeName

> `readonly` **entityTypeName**: `string`

Defined in: [query/odata-validation.error.ts:20](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/query/odata-validation.error.ts#L20)

***

### propertyName

> `readonly` **propertyName**: `string`

Defined in: [query/odata-validation.error.ts:21](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/query/odata-validation.error.ts#L21)
