Skip to content

Commit

Permalink
err: document ABORT_ERR code
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
benjamingr committed Dec 9, 2020
1 parent 8dbeac6 commit a2a2ff3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,18 @@ A human-readable string describing the reason for the error.
<a id="nodejs-error-codes"></a>
## Node.js error codes

<a id="ABORT_ERR"></a>
### `ABORT_ERR`
<!-- YAML
added: v15.0.0
-->
Used when an operation has been aborted (typically using an `AbortController`).

APIs _not_ using `AbortSignal`s typically do not raise an error with this code.

This code does not use the regular `ERR_*` convention Node.js errors use in
order to be compatible with the web platform's `AbortError`.

<a id="ERR_AMBIGUOUS_ARGUMENT"></a>
### `ERR_AMBIGUOUS_ARGUMENT`

Expand Down

0 comments on commit a2a2ff3

Please sign in to comment.