Skip to content

OnUncaughtException Integration should allow to not exit the process #4154

Closed
@adarnon

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions