Documentation
Classes
client.NetworkError

Class: NetworkError<Response>

client.NetworkError

A network error caused by the client or an unexpected response from the server.

Network errors are considered retryable, all others error types will be reported immediately.

To avoid bundling DOM typings (because the client can run in Node env too), you should supply the Response generic depending on your Fetch implementation.

Type parameters

NameType
Responseextends ResponseLike = ResponseLike

Hierarchy

  • Error

    NetworkError

Constructors

constructor

new NetworkError<Response>(msgOrErrOrResponse): NetworkError<Response>

Type parameters

NameType
Responseextends ResponseLike = ResponseLike

Parameters

NameType
msgOrErrOrResponsestring | Error | Response

Returns

NetworkError<Response>

Overrides

Error.constructor

Defined in

src/client.ts:806

Properties

response

response: undefined | Response

The underlyig response thats considered an error.

Will be undefined when no response is received, instead an unexpected network error.

Defined in

src/client.ts:804