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 https://github.com/nodejs/node/issues/36084 but
never actually documented the error in our error codes list.

This PR adds the error code.

PR-URL: https://github.com/nodejs/node/pull/36319
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
pull/36456/head
Benjamin Gruenbaum 2020-11-29 20:11:32 +02:00 committed by Rich Trott
parent 8dbeac6c04
commit 13e2170812
1 changed files with 12 additions and 0 deletions

View File

@ -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`