aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/setupRaven.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-29 05:12:20 +0800
committerkumavis <aaron@kumavis.me>2018-03-29 05:12:20 +0800
commitbedc1d1a477c94fe38c52d9d2b0b02405a399629 (patch)
treef80211eb2c307d9b52f40f3ff6923716473b0350 /app/scripts/lib/setupRaven.js
parent4f915cf2d817cf4dadea581c90a98841b81c156d (diff)
parent8766420f19251b95211dd99ff9a45e60cf0177ad (diff)
downloadtangerine-wallet-browser-bedc1d1a477c94fe38c52d9d2b0b02405a399629.tar
tangerine-wallet-browser-bedc1d1a477c94fe38c52d9d2b0b02405a399629.tar.gz
tangerine-wallet-browser-bedc1d1a477c94fe38c52d9d2b0b02405a399629.tar.bz2
tangerine-wallet-browser-bedc1d1a477c94fe38c52d9d2b0b02405a399629.tar.lz
tangerine-wallet-browser-bedc1d1a477c94fe38c52d9d2b0b02405a399629.tar.xz
tangerine-wallet-browser-bedc1d1a477c94fe38c52d9d2b0b02405a399629.tar.zst
tangerine-wallet-browser-bedc1d1a477c94fe38c52d9d2b0b02405a399629.zip
Merge branch 'master' of github.com:MetaMask/metamask-extension into ci-artifacts
Diffstat (limited to 'app/scripts/lib/setupRaven.js')
-rw-r--r--app/scripts/lib/setupRaven.js14
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