Skip to content

Commit f2f66b4

Browse files
jasnellBethGriggs
authored andcommitted
http2: remove streamError from docs
`streamError` was removed quite some time ago but the docs and code comments weren't updated. Fix that. Fixes: #20211 Backport-PR-URL: #22850 PR-URL: #22246 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 7ea08ee commit f2f66b4

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

doc/api/http2.md

-12
Original file line numberDiff line numberDiff line change
@@ -1505,10 +1505,6 @@ added: v8.4.0
15051505

15061506
* Extends: {net.Server}
15071507

1508-
In `Http2Server`, there are no `'clientError'` events as there are in
1509-
HTTP1. However, there are `'sessionError'`, and `'streamError'` events for
1510-
errors emitted on the socket, or from `Http2Session` or `Http2Stream` instances.
1511-
15121508
#### Event: 'checkContinue'
15131509
<!-- YAML
15141510
added: v8.5.0
@@ -1558,14 +1554,6 @@ added: v8.4.0
15581554
The `'sessionError'` event is emitted when an `'error'` event is emitted by
15591555
an `Http2Session` object associated with the `Http2Server`.
15601556

1561-
#### Event: 'streamError'
1562-
<!-- YAML
1563-
added: v8.5.0
1564-
-->
1565-
1566-
If a `ServerHttp2Stream` emits an `'error'` event, it will be forwarded here.
1567-
The stream will already be destroyed when this event is triggered.
1568-
15691557
#### Event: 'stream'
15701558
<!-- YAML
15711559
added: v8.4.0

lib/internal/http2/compat.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ function onStreamError(error) {
103103
//
104104
// errors in compatibility mode are
105105
// not forwarded to the request
106-
// and response objects. However,
107-
// they are forwarded to 'streamError'
108-
// on the server by Http2Stream
106+
// and response objects.
109107
}
110108

111109
function onRequestPause() {

test/parallel/test-http2-compat-serverresponse-destroy.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ const http2 = require('http2');
88
const Countdown = require('../common/countdown');
99

1010
// Check that destroying the Http2ServerResponse stream produces
11-
// the expected result, including the ability to throw an error
12-
// which is emitted on server.streamError
11+
// the expected result.
1312

1413
const errors = [
1514
'test-error',

0 commit comments

Comments
 (0)