Skip to content

Document types of fetch errors more thoroughly  #549

@bitinn

Description

@bitinn

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions