The Wayback Machine - https://web.archive.org/web/20220721142842/https://github.com/node-fetch/node-fetch/issues/549
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document types of fetch errors more thoroughly #549

Open
bitinn opened this issue Nov 13, 2018 · 0 comments
Open

Document types of fetch errors more thoroughly #549

bitinn opened this issue Nov 13, 2018 · 0 comments

Comments

@bitinn
Copy link
Collaborator

@bitinn bitinn commented Nov 13, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants