Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http2: remove streamError from docs #22246

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1510,10 +1510,6 @@ added: v8.4.0

* Extends: {net.Server}

In `Http2Server`, there are no `'clientError'` events as there are in
HTTP1. However, there are `'sessionError'`, and `'streamError'` events for
errors emitted on the socket, or from `Http2Session` or `Http2Stream` instances.

#### Event: 'checkContinue'
<!-- YAML
added: v8.5.0
Expand Down Expand Up @@ -1563,14 +1559,6 @@ added: v8.4.0
The `'sessionError'` event is emitted when an `'error'` event is emitted by
an `Http2Session` object associated with the `Http2Server`.

#### Event: 'streamError'
<!-- YAML
added: v8.5.0
-->

If a `ServerHttp2Stream` emits an `'error'` event, it will be forwarded here.
The stream will already be destroyed when this event is triggered.

#### Event: 'stream'
<!-- YAML
added: v8.4.0
Expand Down
4 changes: 1 addition & 3 deletions lib/internal/http2/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ function onStreamError(error) {
//
// errors in compatibility mode are
// not forwarded to the request
// and response objects. However,
// they are forwarded to 'streamError'
// on the server by Http2Stream
// and response objects.
}

function onRequestPause() {
Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-http2-compat-serverresponse-destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const http2 = require('http2');
const Countdown = require('../common/countdown');

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

const errors = [
'test-error',
Expand Down