There used to be only one type of operational error from node-fetch: FetchError.
This is no longer the case as I can count at least six: Error, NodeError, TypeError, SyntaxError, AbortError and FetchError. All of them can be triggered in one way or another through invalid response.
We would like to unify them in some ways but it's (a) a breaking change, (b) sometimes not standard compliant (see #498).
So for those we can't wrap with FetchError in next major release, the doc needs to be updated:
https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md
There used to be only one type of operational error from node-fetch:
FetchError.This is no longer the case as I can count at least six:
Error,NodeError,TypeError,SyntaxError,AbortErrorandFetchError. All of them can be triggered in one way or another through invalid response.We would like to unify them in some ways but it's (a) a breaking change, (b) sometimes not standard compliant (see #498).
So for those we can't wrap with
FetchErrorin next major release, the doc needs to be updated:https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md