mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
92971d3c87
* Update eslint-plugin-import version * Convert JS files to use ESM * Update ESLint rules to check imports * Fix test:unit:global command env * Cleanup mock-dev script
17 lines
451 B
JavaScript
17 lines
451 B
JavaScript
import extractEthjsErrorMessage from './extractEthjsErrorMessage'
|
|
|
|
export default reportFailedTxToSentry
|
|
|
|
//
|
|
// utility for formatting failed transaction messages
|
|
// for sending to sentry
|
|
//
|
|
|
|
function reportFailedTxToSentry ({ sentry, txMeta }) {
|
|
const errorMessage = 'Transaction Failed: ' + extractEthjsErrorMessage(txMeta.err.message)
|
|
sentry.captureMessage(errorMessage, {
|
|
// "extra" key is required by Sentry
|
|
extra: { txMeta },
|
|
})
|
|
}
|