Skip to content

Latest commit

 

History

History
65 lines (37 loc) · 1.42 KB

client.NetworkError.md

File metadata and controls

65 lines (37 loc) · 1.42 KB

graphql-http / client / NetworkError

Class: NetworkError<Response>

client.NetworkError

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

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

Name Type
Response extends ResponseLike = ResponseLike

Hierarchy

  • Error

    NetworkError

Table of contents

Constructors

Properties

Constructors

constructor

new NetworkError<Response>(msgOrErrOrResponse)

Type parameters

Name Type
Response extends ResponseLike = ResponseLike

Parameters

Name Type
msgOrErrOrResponse string | Response | Error

Overrides

Error.constructor

Properties

response

response: undefined | Response

The underlying response thats considered an error.

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