node-fetch/node-fetch

Document types of fetch errors more thoroughly

Open

#549 opened on 2018年11月13日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)JavaScript (8,563 stars) (1,061 forks)batch import
Node-specificgood first issue

説明

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

コントリビューターガイド

Document types of fetch errors more thoroughly · node-fetch/node-fetch#549 | Good First Issue