Skip to content

Commit 21d5171

Browse files
ChALkeRkjin
authored andcommitted
doc: fix http2stream.pushStream error doc
The old error code `ERR_HTTP2_STREAM_CLOSED` was removed in commit 0babd18 (pull request nodejs#17406), and the testcase for http2stream.pushStream was changed accordingly, but the documentation change was overlooked. This commit fixes it and aligns the documentation with the testcase. This is a part of the fixes hinted by nodejs#21470, which includes some tests for error codes usage and documentation and enforces a stricter format. Refs: nodejs#21470 Refs: nodejs#17406 PR-URL: nodejs#21487 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 6a537de commit 21d5171

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/http2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3144,7 +3144,7 @@ added: v8.4.0
31443144
Call [`http2stream.pushStream()`][] with the given headers, and wraps the
31453145
given newly created [`Http2Stream`] on `Http2ServerResponse`.
31463146

3147-
The callback will be called with an error with code `ERR_HTTP2_STREAM_CLOSED`
3147+
The callback will be called with an error with code `ERR_HTTP2_INVALID_STREAM`
31483148
if the stream is closed.
31493149

31503150
## Collecting HTTP/2 Performance Metrics

0 commit comments

Comments
 (0)