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) {
|
} catch (err) {
|
||||||
this.send(err.message, msg.data.id, true)
|
this.send(err.message, msg.data.id, true)
|
||||||
// TODO: Allow passing method/message as an extra context
|
logError(Errors._901, err.message, {
|
||||||
// Tweak CodedException class to accept it as a second argument
|
contexts: {
|
||||||
logError(Errors._901, `${msg.data.method} ${err.message}`)
|
safeApp: this.app,
|
||||||
|
request: msg.data,
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,7 +274,13 @@ export const getAppInfoFromUrl = memoize(
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logError(Errors._900, `${res.url}: ${error.message}`, undefined, false)
|
logError(Errors._900, error.message, {
|
||||||
|
contexts: {
|
||||||
|
safeApp: {
|
||||||
|
url: appUrl,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue