Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDocument types of fetch errors more thoroughly #549
Labels
Milestone
Comments
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


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