From 95a8d5aac31740c8b541069f991ff02c5532b378 Mon Sep 17 00:00:00 2001 From: Andrew Ledvina Date: Tue, 13 Jun 2017 18:01:22 -0700 Subject: [PATCH 1/2] include reason and promise in original args used for passing to checkIgnore --- src/browser/rollbar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/browser/rollbar.js b/src/browser/rollbar.js index e2b8755fb..4148cbb59 100644 --- a/src/browser/rollbar.js +++ b/src/browser/rollbar.js @@ -137,6 +137,8 @@ Rollbar.prototype.handleUnhandledRejection = function(reason, promise) { } item.level = this.options.uncaughtErrorLevel; item._isUncaught = true; + item._originalArgs = item._originalArgs || []; + item._originalArgs.push(reason, promise); this.client.log(item); }; From 497e1c27d2f911a2311b84f3c5976d7f3e0f9fe7 Mon Sep 17 00:00:00 2001 From: Andrew Ledvina Date: Tue, 13 Jun 2017 18:09:58 -0700 Subject: [PATCH 2/2] include the reason in the item even if it is not an error, even though this duplicates information that is already in message --- src/browser/rollbar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/rollbar.js b/src/browser/rollbar.js index 4148cbb59..bad1242b0 100644 --- a/src/browser/rollbar.js +++ b/src/browser/rollbar.js @@ -123,7 +123,7 @@ Rollbar.prototype.handleUnhandledRejection = function(reason, promise) { if (_.isError(reason)) { item = this._createItem([message, reason, context]); } else { - item = this._createItem([message, context]); + item = this._createItem([message, reason, context]); item.stackInfo = _.makeUnhandledStackInfo( message, '', @@ -138,7 +138,7 @@ Rollbar.prototype.handleUnhandledRejection = function(reason, promise) { item.level = this.options.uncaughtErrorLevel; item._isUncaught = true; item._originalArgs = item._originalArgs || []; - item._originalArgs.push(reason, promise); + item._originalArgs.push(promise); this.client.log(item); };