Skip to content

aborting should throw a DOMException #1519

Open

Description

@jimmywarting

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)

Activity

  1. added this to the Version 4.0.0 milestone on Mar 9, 2022
  2. changed the title [-]aborting should throw a doeexception[/-] [+]aborting should throw a DOMException[/+] on Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions