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

fix: cancel request example import #1513

Merged
merged 2 commits into from
Mar 1, 2022
Merged

fix: cancel request example import #1513

merged 2 commits into from
Mar 1, 2022

Conversation

SoftwareAndOutsourcing
Copy link
Contributor

@SoftwareAndOutsourcing SoftwareAndOutsourcing commented Feb 25, 2022

Fixes cancel request example import.

@SoftwareAndOutsourcing SoftwareAndOutsourcing changed the title Fix cancel request example fix: cancel request example import Feb 25, 2022
@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).

README.md Outdated Show resolved Hide resolved
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@LinusU
Copy link
Member

LinusU commented Mar 1, 2022

@jimmywarting I think that would be nice, but I still think that we should merge this one in the mean time 👍

@jimmywarting
Copy link
Collaborator

Alright. maybe change it in next major release to avoid breakage?

@jimmywarting jimmywarting merged commit 61b3b5a into node-fetch:main Mar 1, 2022
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

🎉 This PR is included in version 3.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jimmywarting
Copy link
Collaborator

jimmywarting commented Mar 1, 2022

should maybe have done docs: instead of fix: to avoid bumping an unnecessary release, anyway... to late for that

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

Successfully merging this pull request may close these issues.

3 participants