Skip to content

Commit 3341b2c

Browse files
benjamingrtargos
authored andcommitted
doc: document ABORT_ERR code
We added an `AbortError` with the same code and name as the web's as part of the consensus in #36084 but never actually documented the error in our error codes list. This PR adds the error code. PR-URL: #36319 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 8ecf2f9 commit 3341b2c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/api/errors.md

+12
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,18 @@ A human-readable string describing the reason for the error.
612612
<a id="nodejs-error-codes"></a>
613613
## Node.js error codes
614614

615+
<a id="ABORT_ERR"></a>
616+
### `ABORT_ERR`
617+
<!-- YAML
618+
added: v15.0.0
619+
-->
620+
Used when an operation has been aborted (typically using an `AbortController`).
621+
622+
APIs _not_ using `AbortSignal`s typically do not raise an error with this code.
623+
624+
This code does not use the regular `ERR_*` convention Node.js errors use in
625+
order to be compatible with the web platform's `AbortError`.
626+
615627
<a id="ERR_AMBIGUOUS_ARGUMENT"></a>
616628
### `ERR_AMBIGUOUS_ARGUMENT`
617629

0 commit comments

Comments
 (0)