Skip to content

breeze-client / SaveError

Interface: SaveError ​

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

Shape of a save error when returned to the client.

Extends ​

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.

Inherited from ​

ServerError.body


cause? ​

optional cause?: unknown

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

Inherited from ​

ServerError.cause


entityErrors? ​

optional entityErrors?: EntityError[]

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

The errors the server reported on particular entities. Undefined when it named none - after a network failure or a server exception, say - which is how to tell a rejected save from those. Breeze also adds each one to its entity's validation errors.

When client-side validation stops a save before it is sent, the rejection is a plain Error with entityErrors built from the entities' validation errors, and no HTTP members.


httpResponse ​

httpResponse: HttpResponse

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

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

Inherited from ​

ServerError.httpResponse


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.

Inherited from ​

ServerError.message


name ​

name: string

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

Inherited from ​

ServerError.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.

Inherited from ​

ServerError.problemType


stack? ​

optional stack?: string

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

Inherited from ​

ServerError.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.

Inherited from ​

ServerError.status


statusText? ​

optional statusText?: string

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

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

Inherited from ​

ServerError.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.

Inherited from ​

ServerError.url

Released under the MIT License.