diff --git a/lib/client.js b/lib/client.js index 65616fc..79a0967 100644 --- a/lib/client.js +++ b/lib/client.js @@ -123,7 +123,17 @@ extend(Raven.prototype, { global.process.on('unhandledRejection', function(reason, promise) { var context = promise.domain && promise.domain.sentryContext; self.captureException(reason, context || {}, function(sendErr, eventId) { - if (!sendErr) utils.consoleAlert('unhandledRejection captured: ' + eventId); + if (!sendErr) { + var reasonMessage = (reason && reason.message) || reason; + utils.consoleAlert( + 'unhandledRejection captured\n' + + 'Event ID: ' + + eventId + + '\n' + + 'Reason: ' + + reasonMessage + ); + } }); }); }