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

OnUncaughtException Integration should allow to not exit the process #4154

Closed
5 of 9 tasks
adarnon opened this issue Nov 12, 2021 · 3 comments
Closed
5 of 9 tasks

OnUncaughtException Integration should allow to not exit the process #4154

adarnon opened this issue Nov 12, 2021 · 3 comments
Labels
Meta: Help Wanted Package: node Issues related to the Sentry Node SDK Type: Improvement

Comments

@adarnon
Copy link

adarnon commented Nov 12, 2021

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

6.14.3

Description

Node's OnUncaughtException handler has implemented logic to report the exception to Sentry and exit the process. However, exiting the process is not always desirable. If I have a long-running Node server process, I'd want an uncaught exception to be captured, but I don't want the process to exit.

Overriding onFatalError is not enough, because Sentry forcefully kills the process if two uncaught exceptions happen in a row, even if they are unrelated to each other (due to the caughtFirstError variable in the _makeErrorHandler() closure - see onuncaughtexception.ts)

@AbhiPrasad
Copy link
Member

Probably best we introduce an option for this. Will backlog, but PRs are welcome to add this functionality!

@maxpain
Copy link

maxpain commented Oct 29, 2022

Any news?

@Lms24
Copy link
Member

Lms24 commented Jul 25, 2023

Hi, seems like this issue slipped through.
I'm going to close as this as it was fixed by introducing exitEvenIfOtherHandlersAreRegistered (#1661 (comment)). Please feel free to let us know if you think this issue should be repopened.

@Lms24 Lms24 closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta: Help Wanted Package: node Issues related to the Sentry Node SDK Type: Improvement
Projects
None yet
Development

No branches or pull requests

4 participants