diff options
author | Frankie <frankie.diamond@gmail.com> | 2018-03-29 03:55:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-29 03:55:52 +0800 |
commit | 06112b3e30165cfb583c7fcf1eee5beaa446726c (patch) | |
tree | 04671308e02064b8b04f10871e4ea0466085ec66 /app | |
parent | 5a9aa153ecd0721be3a643afe1d23349f5b567eb (diff) | |
parent | 97e1fcd331e9f71cfd7e2958b2b92d1914a89b07 (diff) | |
download | tangerine-wallet-browser-06112b3e30165cfb583c7fcf1eee5beaa446726c.tar tangerine-wallet-browser-06112b3e30165cfb583c7fcf1eee5beaa446726c.tar.gz tangerine-wallet-browser-06112b3e30165cfb583c7fcf1eee5beaa446726c.tar.bz2 tangerine-wallet-browser-06112b3e30165cfb583c7fcf1eee5beaa446726c.tar.lz tangerine-wallet-browser-06112b3e30165cfb583c7fcf1eee5beaa446726c.tar.xz tangerine-wallet-browser-06112b3e30165cfb583c7fcf1eee5beaa446726c.tar.zst tangerine-wallet-browser-06112b3e30165cfb583c7fcf1eee5beaa446726c.zip |
Merge pull request #3765 from MetaMask/sentry-error-simplify
sentry - simplify error message 'Transaction Failed: known transaction'
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/setupRaven.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/scripts/lib/setupRaven.js b/app/scripts/lib/setupRaven.js index a869588d0..b93591e65 100644 --- a/app/scripts/lib/setupRaven.js +++ b/app/scripts/lib/setupRaven.js @@ -23,10 +23,20 @@ function setupRaven(opts) { release, transport: function(opts) { const report = opts.data - // simplify ethjs error messages + // simplify certain complex error messages report.exception.values.forEach(item => { - item.value = extractEthjsErrorMessage(item.value) + let errorMessage = item.value + // simplify ethjs error messages + errorMessage = extractEthjsErrorMessage(errorMessage) + // simplify 'Transaction Failed: known transaction' + if (errorMessage.indexOf('Transaction Failed: known transaction') === 0) { + // cut the hash from the error message + errorMessage = 'Transaction Failed: known transaction' + } + // finalize + item.value = errorMessage }) + // modify report urls rewriteReportUrls(report) // make request normally |