Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Co-authored-by: Linus UnnebΓ€ck <[email protected]>
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