mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Merge pull request #186 from ascribe/add-error-json-to-sentry
Log error json payloads in Sentry
This commit is contained in:
commit
80a63e1c8c
@ -15,6 +15,13 @@ import AppConstants from '../constants/application_constants';
|
||||
function logGlobal(error, comment, ignoreSentry) {
|
||||
console.error(error);
|
||||
|
||||
if (error.hasOwnProperty('json')) {
|
||||
comment = {
|
||||
...comment,
|
||||
json: error.json
|
||||
};
|
||||
}
|
||||
|
||||
if (!ignoreSentry) {
|
||||
Raven.captureException(error, comment ? { extra: { comment } } : undefined);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user