Skip to content

OnUncaughtException Integration should allow to not exit the process #4154

Closed

Description

@adarnon

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)

Activity

  1. AbhiPrasad commented on Nov 12, 2021

    @AbhiPrasad
    Contributor

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

  2. maxpain commented on Oct 29, 2022

    @maxpain

    Any news?

  3. Lms24 commented on Jul 25, 2023

    @Lms24
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions