Feature: Better error handling for Safe apps things (#2340)
* handle request/app fetch errors * shorted extraMessage for app fetch error * use context instead of extra for safe app url exception when fetching * app -> safeApp for sentry context
This commit is contained in:
parent
1758cb34c3
commit
cc345946e6
|
@ -69,9 +69,12 @@ class AppCommunicator {
|
|||
}
|
||||
} catch (err) {
|
||||
this.send(err.message, msg.data.id, true)
|
||||
// TODO: Allow passing method/message as an extra context
|
||||
// Tweak CodedException class to accept it as a second argument
|
||||
logError(Errors._901, `${msg.data.method} ${err.message}`)
|
||||
logError(Errors._901, err.message, {
|
||||
contexts: {
|
||||
safeApp: this.app,
|
||||
request: msg.data,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -274,7 +274,13 @@ export const getAppInfoFromUrl = memoize(
|
|||
}
|
||||
return res
|
||||
} catch (error) {
|
||||
logError(Errors._900, `${res.url}: ${error.message}`, undefined, false)
|
||||
logError(Errors._900, error.message, {
|
||||
contexts: {
|
||||
safeApp: {
|
||||
url: appUrl,
|
||||
},
|
||||
},
|
||||
})
|
||||
return res
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue