doc: remove 2 unused error codes from errors.md
This removes two unused error codes.
Those two are:
-
ERR_STREAM_READ_NOT_IMPLEMENTED
, removed in c9794880 (PR #18813). -
ERR_VALUE_OUT_OF_RANGE
, removed in d022cb1b (PR #17648).
There are concerns about removing error codes voiced by @jasnell and @joyeecheung here: https://github.com/nodejs/node/pull/21470#issuecomment-399550687, implying that the documentation for all removed error codes should stay forever in doc/api/errors.md
(hence I requested their review here).
As I said in that PR — we have a history of removing error codes from that document, and those two remainders look more like an accident than a result of an established process to keep error codes.
List of previous removals (might be or not be parital):
-
186857f1 — removes
ERR_INVALID_ARRAY_LENGTH
-
564048dc — removes
ERR_INVALID_DOMAIN_NAME
-
36269440 — renames
ERR_STRING_TOO_LARGE
(#19864, old name never ended up in a release) -
301f6cc5 — removes
ERR_FS_WATCHER_ALREADY_STARTED
andERR_FS_WATCHER_NOT_STARTED
-
5e3f5164 — removes/renames
ERR_ZLIB_BINDING_CLOSED
-
6e1c25c4 — removes
ERR_HTTP_INVALID_CHAR
,ERR_HTTP2_ALREADY_SHUTDOWN
,ERR_HTTP2_FRAME_ERROR
,ERR_HTTP2_HEADER_REQUIRED
,ERR_HTTP2_HEADERS_OBJECT
,ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND
,ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK
,ERR_NAPI_CONS_PROTOTYPE_OBJECT
,ERR_PARSE_HISTORY_DATA
,ERR_TLS_RENEGOTIATION_FAILED
-
a82b1b7b — removes
ERR_OUTOFMEMORY
-
0babd181 — removes/renames
ERR_HTTP2_STREAM_CLOSED
-
1cdb41f2 — removes
ERR_HTTP2_ERROR
,ERR_UNKNOWN_BUILTIN_MODULE
(ERR_HTTP2_HEADER_SINGLE_VALUE
is just moved around) Revert in #21484. -
e6b69b94 — removes
ERR_INVALID_REPL_HISTORY
-
1b54371c — renames
ERR_STREAM_HAS_STRINGDECODER
See e.g. the first one from that list: https://github.com/nodejs/node/pull/20484, which happened recently, is about an explicit error code removal, has been reviewed by @jasnell and @joyeecheung, and removed an error code that was present in released versions.
To my understanding, the current process is to remove obsolete error codes — this is what the list of commits above hints, and else there would have been more than two documented but unused error codes (in fact, there would have been a lot of those).
I propose to align the current documentation with that (i.e. to remove those two unused error codes from the doc), then, if/when we come to a conclusion to change that process and revert the removal — land them all back, perhaps to a separate page or whatever.
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.
Tests are not included — #21470 does that.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines