Fix Sentry error processing for errors missing a stack (#8179)

Errors without stack traces would break the Sentry error processing,
which assumes the presence of a stack trace. Many errors don't have any
stack trace though, such as uncaught promises.

This breakage resulting in the app state being missing from the error
report, and a console warning.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent 2b3acfc92b
commit 28e2354583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      app/scripts/lib/setupSentry.js

@ -95,9 +95,11 @@ function rewriteReportUrls (report) {
// update exception stack trace
if (report.exception && report.exception.values) {
report.exception.values.forEach((item) => {
item.stacktrace.frames.forEach((frame) => {
frame.filename = toMetamaskUrl(frame.filename)
})
if (item.stacktrace) {
item.stacktrace.frames.forEach((frame) => {
frame.filename = toMetamaskUrl(frame.filename)
})
}
})
}
}

Loading…
Cancel
Save