aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-05-01 03:10:15 +0800
committerkumavis <aaron@kumavis.me>2018-05-01 03:10:15 +0800
commite881ea7aaf1faea8fdbf730c09a1aadbf2366d45 (patch)
tree8500a75aa1f2756358615818656b8b3323824bcc /app
parent2a8d3ea450791c9c932bff4908aab3e62a1408f5 (diff)
downloadtangerine-wallet-browser-e881ea7aaf1faea8fdbf730c09a1aadbf2366d45.tar
tangerine-wallet-browser-e881ea7aaf1faea8fdbf730c09a1aadbf2366d45.tar.gz
tangerine-wallet-browser-e881ea7aaf1faea8fdbf730c09a1aadbf2366d45.tar.bz2
tangerine-wallet-browser-e881ea7aaf1faea8fdbf730c09a1aadbf2366d45.tar.lz
tangerine-wallet-browser-e881ea7aaf1faea8fdbf730c09a1aadbf2366d45.tar.xz
tangerine-wallet-browser-e881ea7aaf1faea8fdbf730c09a1aadbf2366d45.tar.zst
tangerine-wallet-browser-e881ea7aaf1faea8fdbf730c09a1aadbf2366d45.zip
sentry - report error-like messages using the obj message
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/setupRaven.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/scripts/lib/setupRaven.js b/app/scripts/lib/setupRaven.js
index b69e08bae..b1b67f771 100644
--- a/app/scripts/lib/setupRaven.js
+++ b/app/scripts/lib/setupRaven.js
@@ -24,6 +24,8 @@ function setupRaven(opts) {
transport: function(opts) {
const report = opts.data
try {
+ // handle error-like non-error exceptions
+ nonErrorException(report)
// simplify certain complex error messages (e.g. Ethjs)
simplifyErrorMessages(report)
// modify report urls
@@ -40,6 +42,14 @@ function setupRaven(opts) {
return Raven
}
+function nonErrorException(report) {
+ // handle errors that lost their error-ness in serialization
+ if (report.message.includes('Non-Error exception captured with keys: message')) {
+ if (!(report.extra && report.extra.__serialized__)) return
+ report.message = `Non-Error Exception: ${report.extra.__serialized__.message}`
+ }
+}
+
function simplifyErrorMessages(report) {
if (report.exception && report.exception.values) {
report.exception.values.forEach(item => {