Skip to content
module@warp-drive/core/types/spec/error

Interface ApiError ​

Defined in: warp-drive-packages/core/src/types/spec/error.ts:18

Represents a single error in the errors member of a {json:api} document.

{json:api} Spec

Example ​

json
{
  "status": "422",
  "source": { "pointer": "/data/attributes/name" },
  "title": "Invalid Attribute",
  "detail": "name cannot be blank"
}

Properties ​

code? ​

ts
optional code?: string;

Defined in: warp-drive-packages/core/src/types/spec/error.ts:52

an application-specific error code, expressed as a string value


detail? ​

ts
optional detail?: string;

Defined in: warp-drive-packages/core/src/types/spec/error.ts:31

a human-readable explanation specific to this occurrence of the problem


id? ​

ts
optional id?: string;

Defined in: warp-drive-packages/core/src/types/spec/error.ts:22

a unique identifier for this particular occurrence of the problem


ts
optional links?: object;

Defined in: warp-drive-packages/core/src/types/spec/error.ts:35

links related to the error

about? ​

ts
optional about?: Link;

a link that leads to further details about this particular occurrence of the problem

type? ​

ts
optional type?: Link;

a link that identifies the type of error that this particular error is an instance of


meta? ​

ts
optional meta?: ObjectValue;

Defined in: warp-drive-packages/core/src/types/spec/error.ts:73

non-standard meta-information about the error


source? ​

ts
optional source?: object;

Defined in: warp-drive-packages/core/src/types/spec/error.ts:56

an object containing references to the primary source of the error

ts
optional header?: string;

the name of a single request header which caused the error

parameter? ​

ts
optional parameter?: string;

the URI query parameter that caused the error

pointer ​

ts
pointer: string;

a JSON Pointer to the value in the request document that caused the error


status? ​

ts
optional status?: string;

Defined in: warp-drive-packages/core/src/types/spec/error.ts:48

the HTTP status code applicable to this problem, expressed as a string value


title? ​

ts
optional title?: string;

Defined in: warp-drive-packages/core/src/types/spec/error.ts:27

a short, human-readable summary of the problem that should not change from occurrence to occurrence of the problem

Released under the MIT License.