Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

All Error's being sent #14

Closed
Tivoli opened this issue Aug 11, 2013 · 1 comment
Closed

All Error's being sent #14

Tivoli opened this issue Aug 11, 2013 · 1 comment

Comments

@Tivoli
Copy link

Tivoli commented Aug 11, 2013

I'm using an express app, is there a way to ignore new Error from reporting an issue? I just want uncaught exceptions basically.

Thanks ^^

@snmaynard
Copy link
Contributor

The best way to achieve this would be to wrap bugsnag's error middleware so it is only called for an uncaught exception. Something like

app.use(function(err, req, res, next) {
    if (!(err.domainEmitter || err.domainBound)) {
      bugsnag.errorHandler(err, req, res, next);
    }
    next(err)
  });

Hopefully that achieves what you are looking for?

@loopj loopj closed this as completed Oct 14, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants