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

aborting should throw a DOMException #1519

Open
jimmywarting opened this issue Mar 9, 2022 · 0 comments
Open

aborting should throw a DOMException #1519

jimmywarting opened this issue Mar 9, 2022 · 0 comments
Milestone

Comments

@jimmywarting
Copy link
Collaborator

Hmm, wondering if not we should try to fix the real problem that is that we return a custom AbortError message, it should rather be a DOMException

// Browser test:
ctrl = new AbortController() 
ctrl.abort()
fetch('/', ctrl).catch(console.log) 
// DOMException { 
//   name: AbortError,
//   code: 20,
//   message: "Failed to execute 'fetch' on 'Window': The user aborted a request." 
// }

We could optionally start to depend on node-domexception. it's already included by another sub dependency of ours (fetch-blob).

Originally posted by @jimmywarting in #1513 (comment)

@jimmywarting jimmywarting added this to the Version 4.0.0 milestone Mar 9, 2022
@LinusU LinusU changed the title aborting should throw a doeexception aborting should throw a DOMException Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant