From 5ab3db75bb1baff723866c1af960c84aeb2dd0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Sat, 23 Jun 2018 13:05:42 +0300 Subject: [PATCH] doc: sort error codes in errors.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/21485 Refs: https://github.com/nodejs/node/pull/21470 Reviewed-By: Colin Ihrig Reviewed-By: Vse Mozhet Byt Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Michaƫl Zasso --- doc/api/errors.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index 0f7f1988c04219..0a7ea79a5f1ea2 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -875,12 +875,6 @@ forbidden. New HTTP/2 Streams may not be opened after the `Http2Session` has received a `GOAWAY` frame from the connected peer. - -### ERR_HTTP2_HEADER_SINGLE_VALUE - -Multiple values were provided for an HTTP/2 header field that was required to -have only a single value. - ### ERR_HTTP2_HEADERS_AFTER_RESPOND @@ -891,6 +885,12 @@ An additional headers was specified after an HTTP/2 response was initiated. An attempt was made to send multiple response headers. + +### ERR_HTTP2_HEADER_SINGLE_VALUE + +Multiple values were provided for an HTTP/2 header field that was required to +have only a single value. + ### ERR_HTTP2_INFO_STATUS_NOT_ALLOWED @@ -1486,6 +1486,12 @@ does not allow `stdout` or `stderr` streams to be closed by user code. An attempt was made to call [`stream.pipe()`][] on a [`Writable`][] stream. + +### ERR_STREAM_DESTROYED + +A stream method was called that cannot complete because the stream was +destroyed using `stream.destroy()`. + ### ERR_STREAM_NULL_VALUES @@ -1535,6 +1541,12 @@ instance.setEncoding('utf8'); An attempt was made to call [`stream.write()`][] after `stream.end()` has been called. + +### ERR_STRING_TOO_LONG + +An attempt has been made to create a string longer than the maximum allowed +length. + ### ERR_SYSTEM_ERROR @@ -1542,18 +1554,6 @@ An unspecified or non-specific system error has occurred within the Node.js process. The error object will have an `err.info` object property with additional details. - -### ERR_STREAM_DESTROYED - -A stream method was called that cannot complete because the stream was -destroyed using `stream.destroy()`. - - -### ERR_STRING_TOO_LONG - -An attempt has been made to create a string longer than the maximum allowed -length. - ### ERR_TLS_CERT_ALTNAME_INVALID @@ -1574,6 +1574,11 @@ recommended to use 2048 bits or larger for stronger security. A TLS/SSL handshake timed out. In this case, the server must also abort the connection. + +### ERR_TLS_RENEGOTIATION_DISABLED + +An attempt was made to renegotiate TLS on a socket instance with TLS disabled. + ### ERR_TLS_REQUIRED_SERVER_NAME @@ -1592,11 +1597,6 @@ vector for denial-of-service attacks. An attempt was made to issue Server Name Indication from a TLS server-side socket, which is only valid from a client. - -### ERR_TLS_RENEGOTIATION_DISABLED - -An attempt was made to renegotiate TLS on a socket instance with TLS disabled. - ### ERR_TRACE_EVENTS_CATEGORY_REQUIRED