diff options
sentry - failed tx - improve ethjs-rpc error formating
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 0da079eb6..4487ff318 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -14,8 +14,10 @@ const NotificationManager = require('./lib/notification-manager.js') const MetamaskController = require('./metamask-controller') const firstTimeState = require('./first-time-state') const setupRaven = require('./lib/setupRaven') +const reportFailedTxToSentry = require('./lib/reportFailedTxToSentry') const setupMetamaskMeshMetrics = require('./lib/setupMetamaskMeshMetrics') + const STORAGE_KEY = 'metamask-config' const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG' @@ -86,11 +88,7 @@ function setupController (initState) { controller.txController.on(`tx:status-update`, (txId, status) => { if (status !== 'failed') return const txMeta = controller.txController.txStateManager.getTx(txId) - const errorMessage = `Transaction Failed: ${txMeta.err.message}` - raven.captureMessage(errorMessage, { - // "extra" key is required by Sentry - extra: txMeta, - }) + reportFailedTxToSentry({ raven, txMeta }) }) // setup state persistence |