GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http2 callbacks silently allow exceptions · Issue #16434 · nodejs/node

http2 callbacks silently allow exceptions #16434

New issue
Copy link
New issue
Copy link
Closed
Closed
http2 callbacks silently allow exceptions#16434
Copy link
Labels
http2Issues and PRs related to the http2 subsystem.

Description

@grantila
grantila
opened on Oct 24, 2017
Issue body actions
  • Version: 8.4-8.7
  • Subsystem: http2

When throwing an exception in a callback handler (e.g. in response), http2 silently does nothing, except it emits streamClosed with an errorCode of NGHTTP2_NO_ERROR.

Expected behaviour; if I throw at http2, log to stderr, then kill the process

Activity

  1. jasnell
    added
    http2Issues and PRs related to the http2 subsystem.
    on Oct 24, 2017
  2. jasnell commented on Oct 24, 2017

    @jasnell
    jasnell
    on Oct 24, 2017
    Member
    More actions

    Well that's not good is it :-) ... will investigate!
    /cc @mcollina @apapirovski

  3. apapirovski commented on Oct 24, 2017

    @apapirovski
    apapirovski
    on Oct 24, 2017
    Contributor
    More actions

    Hmmmm... I can't seem to replicate this. Can you post some sample code?

  4. grantila commented on Oct 25, 2017

    @grantila
    grantila
    on Oct 25, 2017
    Author
    More actions

    Ugh, this happened when running unit tests with mocha, I never did a simple standalone test, although I obviously should have.

    After having investigated a bit now, I realize that mocha sets an 'uncaughtException' handler which swallows the error and continues execution (contrary to what the Node.js documentation tells you to do). By removing all 'uncaughtException' handlers when running the same test within mocha, I get the correct behavior; stderr + process exit.

    Since this is a mocha issue and not http2 (or Node.js for that mattter), I'll close this issue. Sorry for wasting your time 😔

  5. grantila
    closed this as completedon Oct 25, 2017
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

    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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.