From 094346c95527f11134ddac4d0dc29e18a785bde8 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 14:48:54 +0300 Subject: [PATCH] doc: fix http2stream.pushStream error doc The old error code `ERR_HTTP2_STREAM_CLOSED` was removed in commit 0babd181a0c5d775e62a12b3b04fe4d7654fe80a (pull request #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 #21470, which includes some tests for error codes usage and documentation and enforces a stricter format. Refs: https://github.com/nodejs/node/pull/21470 Refs: https://github.com/nodejs/node/pull/17406 PR-URL: https://github.com/nodejs/node/pull/21487 Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat Reviewed-By: Vse Mozhet Byt Reviewed-By: Luigi Pinca --- doc/api/http2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 3e1850a6790b94..9f702de02b03cf 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -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