Skip to content

Commit

Permalink
doc: fix http2stream.pushStream error doc
Browse files Browse the repository at this point in the history
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 <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
ChALkeR committed Jul 10, 2018
1 parent 195480a commit 094346c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3143,7 +3143,7 @@ added: v8.4.0
Call [`http2stream.pushStream()`][] with the given headers, and wraps the
given newly created [`Http2Stream`] on `Http2ServerResponse`.

The callback will be called with an error with code `ERR_HTTP2_STREAM_CLOSED`
The callback will be called with an error with code `ERR_HTTP2_INVALID_STREAM`
if the stream is closed.

## Collecting HTTP/2 Performance Metrics
Expand Down

0 comments on commit 094346c

Please sign in to comment.