Skip to content

fix: cancel request example import - #1513

Merged
jimmywarting merged 2 commits into
node-fetch:mainfrom
SoftwareAndOutsourcing:fix-example
Mar 1, 2022
Merged

jimmywarting merged 2 commits into
node-fetch:mainfrom
SoftwareAndOutsourcing:fix-example

Conversation

@SoftwareAndOutsourcing

@SoftwareAndOutsourcing SoftwareAndOutsourcing commented Feb 25, 2022 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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).

Comment thread README.md Resolved
Co-authored-by: Linus Unnebäck <[email protected]>

@LinusU LinusU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

@LinusU

LinusU commented Mar 1, 2022

Copy link
Copy Markdown
Member

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

@jimmywarting

Copy link
Copy Markdown
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

github-actions Bot commented Mar 1, 2022

Copy link
Copy Markdown

🎉 This PR is included in version 3.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jimmywarting

jimmywarting commented Mar 1, 2022 •

Copy link
Copy Markdown
Collaborator

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