Skip to content

Node suggestion: log errors in unhandledRejection #1909

@OliverJAsh

Description

@OliverJAsh

Package + Version

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

Version:

4.6.1

Description

Out of the box, Node will log unhandled promise rejections. However, after initialising Sentry, these logs will disappear. This happens because Node won't log rejections if an unhandledRejection handler exists, and Sentry registers such a handler.

I would like to suggest that Sentry adds logging to its handler, to provide parity with the experience provided out of the box. At the very least, the docs should mention this behaviour and the need to add manually an additional handler to restore logging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions