1681-engine / index / ApiError
Class: ApiError ​
Defined in: src/net/ApiClient.ts:10
A request that failed. status 0 with code 'NETWORK' is no answer at all (offline, a timeout, a refused connection), 'ABORTED' the caller's own abort; otherwise status is the server's, and code, message and details are what describe read off its body.
Extends ​
Error
Constructors ​
Constructor ​
ts
new ApiError(
status,
code,
message,
details?,
body?
): ApiError;Defined in: src/net/ApiClient.ts:11
Parameters ​
| Parameter | Type | Description |
|---|---|---|
status | number | - |
code | string | - |
message | string | - |
details? | Readonly<Record<string, string>> | - |
body? | unknown | The parsed body of the failed answer, when there was one. |
Returns ​
ApiError
Overrides ​
ts
Error.constructorProperties ​
body? ​
ts
readonly optional body?: unknown;Defined in: src/net/ApiClient.ts:17
The parsed body of the failed answer, when there was one.
code ​
ts
readonly code: string;Defined in: src/net/ApiClient.ts:13
details? ​
ts
readonly optional details?: Readonly<Record<string, string>>;Defined in: src/net/ApiClient.ts:15
status ​
ts
readonly status: number;Defined in: src/net/ApiClient.ts:12