Skip to content

breeze-client / ServerError

Interface: ServerError ​

Defined in: src/manager/entity-manager.ts:70

Base shape of any errors returned from the server.

Extends ​

  • Error

Extended by ​

Properties ​

body? ​

optional body?: any

Defined in: src/manager/entity-manager.ts:83

The body of the failed response, as the adapter received it (httpResponse.data); null if there was none.


cause? ​

optional cause?: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from ​

Error.cause


httpResponse ​

httpResponse: HttpResponse

Defined in: src/manager/entity-manager.ts:72

The failed response, for anything the other members do not cover.


message ​

message: string

Defined in: src/manager/entity-manager.ts:79

The best description Breeze could find: the message in the response body (a .NET exception's message, or the message, detail or title of a JSON error), otherwise the transport's error text. When the status is 0, it also says the server was probably not reached.

Overrides ​

Error.message


name ​

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from ​

Error.name


problemType? ​

optional problemType?: string

Defined in: src/manager/entity-manager.ts:97

The RFC 9457 type member of the problem document, when the server sent one: a URI naming what kind of problem this is.

Read it rather than the message when the recovery depends on the kind of failure. The status code is often not enough on its own - an optimistic concurrency conflict and a duplicate key are both 409, and they are recovered from differently - and message text is not something to match on, since it varies by ORM, database and server version.

Undefined when the server sent no type, which is every pre-3.0 Breeze server and most non-Breeze ones. See ProblemTypes and isConcurrencyError.


stack? ​

optional stack?: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from ​

Error.stack


status ​

status: number

Defined in: src/manager/entity-manager.ts:75

The HTTP status code - see HttpResponse.status. 0 when the request failed before any response arrived.


statusText? ​

optional statusText?: string

Defined in: src/manager/entity-manager.ts:81

The status text of the failed response - see HttpResponse.statusText.


url? ​

optional url?: string

Defined in: src/manager/entity-manager.ts:86

The URL the request was sent to (httpResponse.config.url). Query parameters added with EntityQuery.withParameters are not included.

Released under the MIT License.