Skip to content

Interface: ODataErrorMapping ​

Defined in: response/odata-error.ts:19

What an ODataErrorMapper returns: the OData error to send for an exception.

Serialized as { "error": { code, message, target?, details, innererror? } } with HTTP status status.

Properties ​

code ​

readonly code: string

Defined in: response/odata-error.ts:23

Service-defined error code, e.g. 'CLIENT_NOT_FOUND'.


details? ​

readonly optional details?: readonly ODataErrorDetail[]

Defined in: response/odata-error.ts:29

Additional errors, e.g. one per invalid property.


innererror? ​

readonly optional innererror?: Readonly<Record<string, unknown>>

Defined in: response/odata-error.ts:31

Service-defined debugging information. Do not put secrets or stack traces here.


language? ​

readonly optional language?: string

Defined in: response/odata-error.ts:37

Language of message as an RFC 5646 tag ('es-CO'), sent as the Content-Language response header (OData-Protocol 4.01 §9.4). Default: the errorLanguage module option, else 'en'.


message ​

readonly message: string

Defined in: response/odata-error.ts:25

Human-readable message, sent to the client as is.


status ​

readonly status: number

Defined in: response/odata-error.ts:21

HTTP status code, 400–599.


target? ​

readonly optional target?: string | null

Defined in: response/odata-error.ts:27

The target of the error, e.g. the property name that failed validation (may be null).