Skip to content

Commit

Permalink
misc(error-reporting): report unhandled promise rejections, take 2 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored Nov 27, 2017
1 parent 039c98d commit e4248c2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lighthouse-core/lib/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sentryDelegate.init = function init(opts) {
}

const environmentData = opts.environmentData || {};
const sentryConfig = Object.assign({}, environmentData, {allowSecretKey: true});
const sentryConfig = Object.assign({}, environmentData, {captureUnhandledRejections: true});

try {
const Sentry = require('raven');
Expand Down Expand Up @@ -70,9 +70,6 @@ sentryDelegate.init = function init(opts) {
Sentry.captureException(err, opts, () => resolve());
});
};

// Report any rejections that are never caught
process.on('unhandledRejection', reason => sentryDelegate.captureException(reason));
} catch (e) {
log.warn(
'sentry',
Expand Down

0 comments on commit e4248c2

Please sign in to comment.