graphql-http / client / NetworkError
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.
Name | Type |
---|---|
Response |
extends ResponseLike = ResponseLike |
-
Error
↳
NetworkError
• new NetworkError<Response
>(msgOrErrOrResponse
)
Name | Type |
---|---|
Response |
extends ResponseLike = ResponseLike |
Name | Type |
---|---|
msgOrErrOrResponse |
string | Response | Error |
Error.constructor
• response: undefined
| Response
The underlying response thats considered an error.
Will be undefined when no response is received, instead an unexpected network error.