Skip to content

streamError never emitted #20211

Description

@ronag

Reading the http/2 compat code it mentions a streamError on the server object.

function onStreamError(error) {
  // this is purposefully left blank
  //
  // errors in compatibility mode are
  // not forwarded to the request
  // and response objects. However,
  // they are forwarded to 'streamError'
  // on the server by Http2Stream
}

However, this doesn't seem to be emitted anywhere in the code? Is this something that has been removed from core http/2 and has a leftovers in compat and docs?

Activity

  1. Trott commented on Apr 23, 2018

    @Trott
    Member

    @nodejs/http2

  2. added
    http2Issues and PRs related to the http2 subsystem.
    on Apr 23, 2018
  3. ryzokuken commented on Apr 23, 2018

    @ryzokuken
    Contributor

    You're right, streamError isn't emitted anywhere in the source code. Adding the "confirmed" label.

  4. ryzokuken commented on Apr 23, 2018

    @ryzokuken
    Contributor

    The docs say:

    #### 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.
  5. ryzokuken commented on Apr 23, 2018

    @ryzokuken
    Contributor

    @mcollina @mafintosh this could be resolved by attatching a listener onto the corresponding ServerHttp2Stream that'd emit streamError on the current instance, right?

  6. apapirovski commented on Apr 24, 2018

    @apapirovski
    Contributor

    streamError was removed at some point and the documentation + the code comments are just lagging behind.

  7. mcollina commented on Apr 24, 2018

    @mcollina
    SponsorMember

    All of this is buggy and needs to be refactored. However, there are multiple intiative/prs going in parallel. There is also an old PR from myself that was reverted that fixed some of this, and I forgot to resubmit.

    Can you please leave it alone for some weeks? I’m currently on vacation and with all the rush of Node 10 I had no time to write all of this down.

    streamError is part of the HTTP1 compatibility mode, and it’s a good destination. It should not be removed.

  8. apapirovski commented on Apr 24, 2018

    @apapirovski
    Contributor

    @mcollina I don't think streamError exists in the current codebase and I've gone through it several times. I believe it was removed in 0babd18

    ping @jasnell to ascertain whether that was intentional or not

  9. mcollina commented on Apr 24, 2018

    @mcollina
    SponsorMember

    This should be fixed first: #19852. It fixes the problems introduced by that PR. It’s not done yet and it can use some help.

    I am on vacation for next week or so with limited connectivity.

  10. added a commit that references this issue on Aug 10, 2018
  11. added a commit that references this issue on Aug 12, 2018
  12. added a commit that references this issue on Oct 16, 2018
  13. added a commit that references this issue on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.http2Issues and PRs related to the http2 subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions