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

Use w3c defined message for AbortError #657

Closed
wheresrhys opened this issue Jul 21, 2019 · 2 comments
Closed

Use w3c defined message for AbortError #657

wheresrhys opened this issue Jul 21, 2019 · 2 comments
Labels

Comments

@wheresrhys
Copy link
Contributor

@wheresrhys wheresrhys commented Jul 21, 2019

The w3c draft IDL defines the expected message for AbortError to be The operation was aborted. (https://heycam.github.io/webidl/#aborterror)

But this library uses a different string:

https://github.com/bitinn/node-fetch/blob/0c2294ec48fa5b84519f8bdd60f4e2672ebd9b06/src/index.js#L54

While node-fetch doesn't aim to replicate whatwg fetch in every aspect, this seems like an unnecessary divergence.

@jimmywarting

This comment has been minimized.

Copy link
Collaborator

@jimmywarting jimmywarting commented Jul 21, 2019

It's true that it isn't always the "user" that aborts the request.
it could have been a timeout also.

While we are at it, make it a const variable instead?

@xxczaki xxczaki mentioned this issue Sep 7, 2019
23 of 35 tasks complete
@bitinn bitinn added the pending pr label Sep 8, 2019
@Richienb

This comment has been minimized.

Copy link
Member

@Richienb Richienb commented Sep 10, 2019

Fixed in 886277f.

@Richienb Richienb closed this Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.