Skip to content

Commit ffa16aa

Browse files
BridgeARMylesBorins
authored andcommitted
errors: update all internal errors
This updates all internal errors to the new error type. While doing so it removes unused errors. A few errors currently seem to have the wrong type. To identify them later, comments were added next to the error type. Backport-PR-URL: #19244 PR-URL: #18857 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent d57a242 commit ffa16aa

File tree

3 files changed

+199
-252
lines changed

3 files changed

+199
-252
lines changed

doc/api/errors.md

-55
Original file line numberDiff line numberDiff line change
@@ -735,12 +735,6 @@ falsy value.
735735

736736
An attempt was made to add more headers after the headers had already been sent.
737737

738-
<a id="ERR_HTTP_INVALID_CHAR"></a>
739-
### ERR_HTTP_INVALID_CHAR
740-
741-
An invalid character was found in an HTTP response status message (reason
742-
phrase).
743-
744738
<a id="ERR_HTTP_INVALID_STATUS_CODE"></a>
745739
### ERR_HTTP_INVALID_STATUS_CODE
746740

@@ -752,11 +746,6 @@ Status code was outside the regular status code range (100-999).
752746
The `Trailer` header was set even though the transfer encoding does not support
753747
that.
754748

755-
<a id="ERR_HTTP2_ALREADY_SHUTDOWN"></a>
756-
### ERR_HTTP2_ALREADY_SHUTDOWN
757-
758-
Occurs with multiple attempts to shutdown an HTTP/2 session.
759-
760749
<a id="ERR_HTTP2_ALTSVC_INVALID_ORIGIN"></a>
761750
### ERR_HTTP2_ALTSVC_INVALID_ORIGIN
762751

@@ -785,22 +774,12 @@ forbidden.
785774
For HTTP/2 requests using the `CONNECT` method, the `:scheme` pseudo-header is
786775
forbidden.
787776

788-
<a id="ERR_HTTP2_FRAME_ERROR"></a>
789-
### ERR_HTTP2_FRAME_ERROR
790-
791-
A failure occurred sending an individual frame on the HTTP/2 session.
792-
793777
<a id="ERR_HTTP2_GOAWAY_SESSION"></a>
794778
### ERR_HTTP2_GOAWAY_SESSION
795779

796780
New HTTP/2 Streams may not be opened after the `Http2Session` has received a
797781
`GOAWAY` frame from the connected peer.
798782

799-
<a id="ERR_HTTP2_HEADER_REQUIRED"></a>
800-
### ERR_HTTP2_HEADER_REQUIRED
801-
802-
A required header was missing in an HTTP/2 message.
803-
804783
<a id="ERR_HTTP2_HEADER_SINGLE_VALUE"></a>
805784
### ERR_HTTP2_HEADER_SINGLE_VALUE
806785

@@ -812,22 +791,11 @@ have only a single value.
812791

813792
An additional headers was specified after an HTTP/2 response was initiated.
814793

815-
<a id="ERR_HTTP2_HEADERS_OBJECT"></a>
816-
### ERR_HTTP2_HEADERS_OBJECT
817-
818-
An HTTP/2 Headers Object was expected.
819-
820794
<a id="ERR_HTTP2_HEADERS_SENT"></a>
821795
### ERR_HTTP2_HEADERS_SENT
822796

823797
An attempt was made to send multiple response headers.
824798

825-
<a id="ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND"></a>
826-
### ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND
827-
828-
HTTP/2 Informational headers must only be sent *prior* to calling the
829-
`Http2Stream.prototype.respond()` method.
830-
831799
<a id="ERR_HTTP2_INFO_STATUS_NOT_ALLOWED"></a>
832800
### ERR_HTTP2_INFO_STATUS_NOT_ALLOWED
833801

@@ -1218,14 +1186,6 @@ strict compliance with the API specification (which in some cases may accept
12181186
`func(undefined)` and `func()` are treated identically, and the
12191187
[`ERR_INVALID_ARG_TYPE`][] error code may be used instead.
12201188

1221-
<a id="ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK"></a>
1222-
### ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK
1223-
1224-
> Stability: 1 - Experimental
1225-
1226-
An [ES6 module][] loader hook specified `format: 'dynamic` but did not provide a
1227-
`dynamicInstantiate` hook.
1228-
12291189
<a id="ERR_MISSING_MODULE"></a>
12301190
### ERR_MISSING_MODULE
12311191

@@ -1254,11 +1214,6 @@ would be possible by calling a callback more than once.
12541214

12551215
While using `N-API`, a constructor passed was not a function.
12561216

1257-
<a id="ERR_NAPI_CONS_PROTOTYPE_OBJECT"></a>
1258-
### ERR_NAPI_CONS_PROTOTYPE_OBJECT
1259-
1260-
While using `N-API`, `Constructor.prototype` was not an object.
1261-
12621217
<a id="ERR_NAPI_INVALID_DATAVIEW_ARGS"></a>
12631218
### ERR_NAPI_INVALID_DATAVIEW_ARGS
12641219

@@ -1300,11 +1255,6 @@ A Node.js API was called in an unsupported manner, such as
13001255

13011256
An input argument value was outside an acceptable range.
13021257

1303-
<a id="ERR_PARSE_HISTORY_DATA"></a>
1304-
### ERR_PARSE_HISTORY_DATA
1305-
1306-
The `REPL` module was unable parse data from the REPL history file.
1307-
13081258
<a id="ERR_REQUIRE_ESM"></a>
13091259
### ERR_REQUIRE_ESM
13101260

@@ -1442,11 +1392,6 @@ recommended to use 2048 bits or larger for stronger security.
14421392
A TLS/SSL handshake timed out. In this case, the server must also abort the
14431393
connection.
14441394

1445-
<a id="ERR_TLS_RENEGOTIATION_FAILED"></a>
1446-
### ERR_TLS_RENEGOTIATION_FAILED
1447-
1448-
A TLS renegotiation request has failed in a non-specific way.
1449-
14501395
<a id="ERR_TLS_REQUIRED_SERVER_NAME"></a>
14511396
### ERR_TLS_REQUIRED_SERVER_NAME
14521397

0 commit comments

Comments
 (0)