@@ -397,6 +397,32 @@ error object, such as a {Proxy}.
397397Indicates the failure of an assertion. For details, see
398398[ ` Class: assert.AssertionError ` ] [ ] .
399399
400+ ## Class: ` DOMException `
401+
402+ <!-- YAML
403+ added: v17.0.0
404+ -->
405+
406+ * Extends: {errors.Error}
407+
408+ The Web IDL {DOMException} class. These errors are thrown by web-platform APIs
409+ in Node.js such as [ ` fetch() ` ] [ ] , {AbortController}, {AbortSignal}, and Web
410+ Streams. For details, see also [ ` Class: DOMException ` ] [ ] on the Globals page.
411+
412+ The [ ` domException.name ` ] [ ] property identifies the type of the exception (for
413+ example, ` 'AbortError' ` ). Unlike most errors in Node.js, the
414+ [ ` domException.code ` ] [ ] property is a number that corresponds to a
415+ [ legacy error code name] [ Web IDL error names ] (for example, ` 20 ` for
416+ ` ABORT_ERR ` ).
417+
418+ Node.js-specific APIs that support {AbortSignal} (such as
419+ [ ` events.once() ` ] [ ] ) throw a Node.js ` AbortError ` (a native {errors.Error} with
420+ ` name ` of ` 'AbortError' ` and ` code ` of [ ` 'ABORT_ERR' ` ] [ ABORT_ERR ] ) rather than a
421+ {DOMException}. To identify abort errors in either case, checking
422+ ` err?.name === 'AbortError' ` is sufficient.
423+
424+ See also [ ` ABORT_ERR ` ] [ ] .
425+
400426## Class: ` RangeError `
401427
402428* Extends: {errors.Error}
@@ -4571,6 +4597,7 @@ The public key in the certificate SubjectPublicKeyInfo could not be read.
45714597
45724598An error occurred trying to allocate memory. This should never happen.
45734599
4600+ [ ABORT_ERR ] : #abort_err
45744601[ ES Module ] : esm.md
45754602[ ICU ] : intl.md#internationalization-support
45764603[ JSON Web Key Elliptic Curve Registry ] : https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve
@@ -4584,14 +4611,17 @@ An error occurred trying to allocate memory. This should never happen.
45844611[ V8's stack trace API ] : https://v8.dev/docs/stack-trace-api
45854612[ WHATWG Supported Encodings ] : util.md#whatwg-supported-encodings
45864613[ WHATWG URL API ] : url.md#the-whatwg-url-api
4614+ [ Web IDL error names ] : https://webidl.spec.whatwg.org/#dfn-error-names-table
45874615[ `"exports"` ] : packages.md#exports
45884616[ `"imports"` ] : packages.md#imports
45894617[ `'uncaughtException'` ] : process.md#event-uncaughtexception
45904618[ `--disable-proto=throw` ] : cli.md#--disable-protomode
45914619[ `--force-fips` ] : cli.md#--force-fipsmode
45924620[ `--no-addons` ] : cli.md#--no-addons
45934621[ `--unhandled-rejections` ] : cli.md#--unhandled-rejectionsmode
4622+ [ `ABORT_ERR` ] : #abort_err
45944623[ `BoundSocket` ] : net.md#class-netboundsocket
4624+ [ `Class: DOMException` ] : globals.md#class-domexception
45954625[ `Class: assert.AssertionError` ] : assert.md#class-assertassertionerror
45964626[ `ERR_INCOMPATIBLE_OPTION_PAIR` ] : #err_incompatible_option_pair
45974627[ `ERR_INVALID_ARG_TYPE` ] : #err_invalid_arg_type
@@ -4617,10 +4647,13 @@ An error occurred trying to allocate memory. This should never happen.
46174647[ `dgram.createSocket()` ] : dgram.md#dgramcreatesocketoptions-callback
46184648[ `dgram.disconnect()` ] : dgram.md#socketdisconnect
46194649[ `dgram.remoteAddress()` ] : dgram.md#socketremoteaddress
4650+ [ `domException.code` ] : https://developer.mozilla.org/en-US/docs/Web/API/DOMException/code
46204651[ `domException.name` ] : https://developer.mozilla.org/en-US/docs/Web/API/DOMException/name
46214652[ `errno`(3) man page ] : https://man7.org/linux/man-pages/man3/errno.3.html
46224653[ `error.code` ] : #errorcode
46234654[ `error.message` ] : #errormessage
4655+ [ `events.once()` ] : events.md#eventsonceemitter-name-options
4656+ [ `fetch()` ] : globals.md#fetch
46244657[ `fs.Dir` ] : fs.md#class-fsdir
46254658[ `fs.cp()` ] : fs.md#fscpsrc-dest-options-callback
46264659[ `fs.readFileSync` ] : fs.md#fsreadfilesyncpath-options
0 commit comments