Don't override unhandled rejection, report webhook errors

This commit is contained in:
Brandon Keepers 2017-04-06 08:40:48 -05:00
parent 614df3fad6
commit eb07a5df68
No known key found for this signature in database
GPG Key ID: F9533396D5FACBF6
1 changed files with 1 additions and 5 deletions

View File

@ -26,13 +26,9 @@ module.exports = options => {
}).install({});
}
// Show trace for any unhandled rejections
process.on('unhandledRejection', reason => {
robot.log.error(reason);
});
// Handle case when webhook creation fails
webhook.on('error', err => {
Raven.captureException(err);
robot.log.error(err);
});