mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
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.
This commit is contained in:
parent
2b3acfc92b
commit
28e2354583
@ -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…
Reference in New Issue
Block a user