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

Closed
leandrogoe opened this issue Jun 21, 2023 · 2 comments
Closed
Labels
released This feature/bug fix has been released

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
@clr182 clr182 added released This feature/bug fix has been released and removed bug Confirmed bug backlog We hope to fix this feature/bug in the future labels Nov 1, 2024
@clr182
Copy link

clr182 commented Nov 1, 2024

Hi @leandrogoe

Thank you for your patience. Please upgrade to the latest version, which should fix the issue you are seeing with unhandled promise rejections. After updating, if the issue persists then please let us know and we can investigate further.

@clr182 clr182 closed this as completed Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This feature/bug fix has been released
Projects
None yet
Development

No branches or pull requests

3 participants