Skip to content

Commit c324b85

Browse files
ChALkeRtargos
authored andcommitted
doc: sort error codes in errors.md
A single exception is that ERR_HTTP2_* comes after ERR_HTTP_*. Actual content not changed, just some blocks are moved around. This is a part of the fixes hinted by #21470, which includes some tests for error codes usage and documentation and enforces a stricter format. PR-URL: #21485 Refs: #21470 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 42f5ff8 commit c324b85

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

doc/api/errors.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -875,12 +875,6 @@ forbidden.
875875
New HTTP/2 Streams may not be opened after the `Http2Session` has received a
876876
`GOAWAY` frame from the connected peer.
877877

878-
<a id="ERR_HTTP2_HEADER_SINGLE_VALUE"></a>
879-
### ERR_HTTP2_HEADER_SINGLE_VALUE
880-
881-
Multiple values were provided for an HTTP/2 header field that was required to
882-
have only a single value.
883-
884878
<a id="ERR_HTTP2_HEADERS_AFTER_RESPOND"></a>
885879
### ERR_HTTP2_HEADERS_AFTER_RESPOND
886880

@@ -891,6 +885,12 @@ An additional headers was specified after an HTTP/2 response was initiated.
891885

892886
An attempt was made to send multiple response headers.
893887

888+
<a id="ERR_HTTP2_HEADER_SINGLE_VALUE"></a>
889+
### ERR_HTTP2_HEADER_SINGLE_VALUE
890+
891+
Multiple values were provided for an HTTP/2 header field that was required to
892+
have only a single value.
893+
894894
<a id="ERR_HTTP2_INFO_STATUS_NOT_ALLOWED"></a>
895895
### ERR_HTTP2_INFO_STATUS_NOT_ALLOWED
896896

@@ -1491,6 +1491,12 @@ does not allow `stdout` or `stderr` streams to be closed by user code.
14911491

14921492
An attempt was made to call [`stream.pipe()`][] on a [`Writable`][] stream.
14931493

1494+
<a id="ERR_STREAM_DESTROYED"></a>
1495+
### ERR_STREAM_DESTROYED
1496+
1497+
A stream method was called that cannot complete because the stream was
1498+
destroyed using `stream.destroy()`.
1499+
14941500
<a id="ERR_STREAM_NULL_VALUES"></a>
14951501
### ERR_STREAM_NULL_VALUES
14961502

@@ -1540,25 +1546,19 @@ instance.setEncoding('utf8');
15401546
An attempt was made to call [`stream.write()`][] after `stream.end()` has been
15411547
called.
15421548

1549+
<a id="ERR_STRING_TOO_LONG"></a>
1550+
### ERR_STRING_TOO_LONG
1551+
1552+
An attempt has been made to create a string longer than the maximum allowed
1553+
length.
1554+
15431555
<a id="ERR_SYSTEM_ERROR"></a>
15441556
### ERR_SYSTEM_ERROR
15451557

15461558
An unspecified or non-specific system error has occurred within the Node.js
15471559
process. The error object will have an `err.info` object property with
15481560
additional details.
15491561

1550-
<a id="ERR_STREAM_DESTROYED"></a>
1551-
### ERR_STREAM_DESTROYED
1552-
1553-
A stream method was called that cannot complete because the stream was
1554-
destroyed using `stream.destroy()`.
1555-
1556-
<a id="ERR_STRING_TOO_LONG"></a>
1557-
### ERR_STRING_TOO_LONG
1558-
1559-
An attempt has been made to create a string longer than the maximum allowed
1560-
length.
1561-
15621562
<a id="ERR_TLS_CERT_ALTNAME_INVALID"></a>
15631563
### ERR_TLS_CERT_ALTNAME_INVALID
15641564

@@ -1579,6 +1579,11 @@ recommended to use 2048 bits or larger for stronger security.
15791579
A TLS/SSL handshake timed out. In this case, the server must also abort the
15801580
connection.
15811581

1582+
<a id="ERR_TLS_RENEGOTIATION_DISABLED"></a>
1583+
### ERR_TLS_RENEGOTIATION_DISABLED
1584+
1585+
An attempt was made to renegotiate TLS on a socket instance with TLS disabled.
1586+
15821587
<a id="ERR_TLS_REQUIRED_SERVER_NAME"></a>
15831588
### ERR_TLS_REQUIRED_SERVER_NAME
15841589

@@ -1597,11 +1602,6 @@ vector for denial-of-service attacks.
15971602
An attempt was made to issue Server Name Indication from a TLS server-side
15981603
socket, which is only valid from a client.
15991604

1600-
<a id="ERR_TLS_RENEGOTIATION_DISABLED"></a>
1601-
### ERR_TLS_RENEGOTIATION_DISABLED
1602-
1603-
An attempt was made to renegotiate TLS on a socket instance with TLS disabled.
1604-
16051605
<a id="ERR_TRACE_EVENTS_CATEGORY_REQUIRED"></a>
16061606
### ERR_TRACE_EVENTS_CATEGORY_REQUIRED
16071607

0 commit comments

Comments
 (0)