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

NodeJS: Bugsnag doesn't end the process on unhandled promise rejection #1977

Open
leandrogoe opened this issue Jun 21, 2023 · 1 comment
Open
Labels
backlog We hope to fix this feature/bug in the future bug Confirmed bug

Comments

@leandrogoe
Copy link

leandrogoe commented Jun 21, 2023

Describe the bug

In NodeJS, when an unhandled promise rejection takes place Bugsnag will report the error but the process will remain alive.

This is documented in the Bugsnag documentation:

By default, when an unhandled rejection occurs, BugSnag will send an error report, then print the error to the console. The process remains alive, as per Node’s current default behavior.

Despite this comment is useful, it is partially incorrect as Node's current default behaviour is not to keep the process alive, but to terminate it with exit code 1. This behavior was introduced in NodeJS version 7, so it is well established by now.

In the best case, this is inaccurate documentation, but it is also violating the principle of least surprise. I don't think adding a library like Bugsnag should change what Node does by default.

Environment

  • Bugsnag version: 7.20.2
  • NodeJS version: v18.12.1
@johnkiely1
Copy link
Member

Hi @leandrogoe.

Thanks for raising, this is something that we are aware of. We're working on some improvements in our Node support which will address this. A release for this is coming in the next quarter. We will let you know as soon as we have an update.

@johnkiely1 johnkiely1 added bug Confirmed bug backlog We hope to fix this feature/bug in the future labels Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants