Skip to content

Commit e9876fd

Browse files
SirR4Tvsemozhetbyt
authored andcommitted
doc: document removed error codes
PR-URL: #22100 Fixes: #22061 Refs: #21491 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent c917540 commit e9876fd

File tree

1 file changed

+199
-0
lines changed

1 file changed

+199
-0
lines changed

doc/api/errors.md

+199
Original file line numberDiff line numberDiff line change
@@ -1848,6 +1848,204 @@ Creation of a [`zlib`][] object failed due to incorrect configuration.
18481848
A module file could not be resolved while attempting a [`require()`][] or
18491849
`import` operation.
18501850

1851+
## Legacy Node.js Error Codes
1852+
1853+
> Stability: 0 - Deprecated. These error codes are either inconsistent, or have
1854+
> been removed.
1855+
1856+
<a id="ERR_HTTP2_FRAME_ERROR"></a>
1857+
### ERR_HTTP2_FRAME_ERROR
1858+
<!-- YAML
1859+
added: v9.0.0
1860+
removed: v10.0.0
1861+
-->
1862+
1863+
Used when a failure occurs sending an individual frame on the HTTP/2
1864+
session.
1865+
1866+
<a id="ERR_HTTP2_HEADERS_OBJECT"></a>
1867+
### ERR_HTTP2_HEADERS_OBJECT
1868+
<!-- YAML
1869+
added: v9.0.0
1870+
removed: v10.0.0
1871+
-->
1872+
1873+
Used when an HTTP/2 Headers Object is expected.
1874+
1875+
<a id="ERR_HTTP2_HEADER_REQUIRED"></a>
1876+
### ERR_HTTP2_HEADER_REQUIRED
1877+
<!-- YAML
1878+
added: v9.0.0
1879+
removed: v10.0.0
1880+
-->
1881+
1882+
Used when a required header is missing in an HTTP/2 message.
1883+
1884+
<a id="ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND"></a>
1885+
### ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND
1886+
<!-- YAML
1887+
added: v9.0.0
1888+
removed: v10.0.0
1889+
-->
1890+
1891+
HTTP/2 informational headers must only be sent *prior* to calling the
1892+
`Http2Stream.prototype.respond()` method.
1893+
1894+
<a id="ERR_HTTP2_STREAM_CLOSED"></a>
1895+
### ERR_HTTP2_STREAM_CLOSED
1896+
<!-- YAML
1897+
added: v9.0.0
1898+
removed: v10.0.0
1899+
-->
1900+
1901+
Used when an action has been performed on an HTTP/2 Stream that has already
1902+
been closed.
1903+
1904+
<a id="ERR_HTTP_INVALID_CHAR"></a>
1905+
### ERR_HTTP_INVALID_CHAR
1906+
<!-- YAML
1907+
added: v9.0.0
1908+
removed: v10.0.0
1909+
-->
1910+
1911+
Used when an invalid character is found in an HTTP response status message
1912+
(reason phrase).
1913+
1914+
<a id="ERR_NAPI_CONS_PROTOTYPE_OBJECT"></a>
1915+
### ERR_NAPI_CONS_PROTOTYPE_OBJECT
1916+
<!-- YAML
1917+
added: v9.0.0
1918+
removed: v10.0.0
1919+
-->
1920+
1921+
Used by the `N-API` when `Constructor.prototype` is not an object.
1922+
1923+
<a id="ERR_OUTOFMEMORY"></a>
1924+
### ERR_OUTOFMEMORY
1925+
<!-- YAML
1926+
added: v9.0.0
1927+
removed: v10.0.0
1928+
-->
1929+
1930+
Used generically to identify that an operation caused an out of memory
1931+
condition.
1932+
1933+
<a id="ERR_PARSE_HISTORY_DATA"></a>
1934+
### ERR_PARSE_HISTORY_DATA
1935+
<!-- YAML
1936+
added: v9.0.0
1937+
removed: v10.0.0
1938+
-->
1939+
1940+
The `repl` module was unable to parse data from the REPL history file.
1941+
1942+
<a id="ERR_STREAM_READ_NOT_IMPLEMENTED"></a>
1943+
### ERR_STREAM_READ_NOT_IMPLEMENTED
1944+
<!-- YAML
1945+
added: v9.0.0
1946+
removed: v10.0.0
1947+
-->
1948+
1949+
Used when an attempt is made to use a readable stream that has not implemented
1950+
[`readable._read()`][].
1951+
1952+
<a id="ERR_TLS_RENEGOTIATION_FAILED"></a>
1953+
### ERR_TLS_RENEGOTIATION_FAILED
1954+
<!-- YAML
1955+
added: v9.0.0
1956+
removed: v10.0.0
1957+
-->
1958+
1959+
Used when a TLS renegotiation request has failed in a non-specific way.
1960+
1961+
<a id="ERR_UNKNOWN_BUILTIN_MODULE"></a>
1962+
### ERR_UNKNOWN_BUILTIN_MODULE
1963+
<!-- YAML
1964+
added: v8.0.0
1965+
removed: v9.0.0
1966+
-->
1967+
1968+
The `'ERR_UNKNOWN_BUILTIN_MODULE'` error code is used to identify a specific
1969+
kind of internal Node.js error that should not typically be triggered by user
1970+
code. Instances of this error point to an internal bug within the Node.js
1971+
binary itself.
1972+
1973+
<a id="ERR_VALUE_OUT_OF_RANGE"></a>
1974+
### ERR_VALUE_OUT_OF_RANGE
1975+
<!-- YAML
1976+
added: v9.0.0
1977+
removed: v10.0.0
1978+
-->
1979+
1980+
Used when a given value is out of the accepted range.
1981+
1982+
<a id="ERR_ZLIB_BINDING_CLOSED"></a>
1983+
### ERR_ZLIB_BINDING_CLOSED
1984+
<!-- YAML
1985+
added: v9.0.0
1986+
removed: v10.0.0
1987+
-->
1988+
1989+
Used when an attempt is made to use a `zlib` object after it has already been
1990+
closed.
1991+
1992+
### Other error codes
1993+
1994+
These errors have never been released, but had been present on master between
1995+
releases.
1996+
1997+
<a id="ERR_FS_WATCHER_ALREADY_STARTED"></a>
1998+
#### ERR_FS_WATCHER_ALREADY_STARTED
1999+
2000+
An attempt was made to start a watcher returned by `fs.watch()` that has
2001+
already been started.
2002+
2003+
<a id="ERR_FS_WATCHER_NOT_STARTED"></a>
2004+
#### ERR_FS_WATCHER_NOT_STARTED
2005+
2006+
An attempt was made to initiate operations on a watcher returned by
2007+
`fs.watch()` that has not yet been started.
2008+
2009+
<a id="ERR_HTTP2_ALREADY_SHUTDOWN"></a>
2010+
#### ERR_HTTP2_ALREADY_SHUTDOWN
2011+
2012+
Occurs with multiple attempts to shutdown an HTTP/2 session.
2013+
2014+
<a id="ERR_HTTP2_ERROR"></a>
2015+
#### ERR_HTTP2_ERROR
2016+
2017+
A non-specific HTTP/2 error has occurred.
2018+
2019+
<a id="ERR_INVALID_REPL_HISTORY"></a>
2020+
#### ERR_INVALID_REPL_HISTORY
2021+
2022+
Used in the `repl` in case the old history file is used and an error occurred
2023+
while trying to read and parse it.
2024+
2025+
<a id="ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK"></a>
2026+
#### ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK
2027+
2028+
Used when an [ES6 module][] loader hook specifies `format: 'dynamic'` but does
2029+
not provide a `dynamicInstantiate` hook.
2030+
2031+
<a id="ERR_STREAM_HAS_STRINGDECODER"></a>
2032+
#### ERR_STREAM_HAS_STRINGDECODER
2033+
2034+
Used to prevent an abort if a string decoder was set on the Socket.
2035+
2036+
```js
2037+
const Socket = require('net').Socket;
2038+
const instance = new Socket();
2039+
2040+
instance.setEncoding('utf8');
2041+
```
2042+
2043+
<a id="ERR_STRING_TOO_LARGE"></a>
2044+
#### ERR_STRING_TOO_LARGE
2045+
2046+
An attempt has been made to create a string larger than the maximum allowed
2047+
size.
2048+
18512049
[`--force-fips`]: cli.html#cli_force_fips
18522050
[`'uncaughtException'`]: process.html#process_event_uncaughtexception
18532051
[`child_process`]: child_process.html
@@ -1875,6 +2073,7 @@ A module file could not be resolved while attempting a [`require()`][] or
18752073
[`new URLSearchParams(iterable)`]: url.html#url_constructor_new_urlsearchparams_iterable
18762074
[`process.send()`]: process.html#process_process_send_message_sendhandle_options_callback
18772075
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn
2076+
[`readable._read()`]: stream.html#stream_readable_read_size_1
18782077
[`require()`]: modules.html#modules_require
18792078
[`require('crypto').setEngine()`]: crypto.html#crypto_crypto_setengine_engine_flags
18802079
[`server.listen()`]: net.html#net_server_listen

0 commit comments

Comments
 (0)