mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +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) {
|
function logGlobal(error, comment, ignoreSentry) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
||||||
|
if (error.hasOwnProperty('json')) {
|
||||||
|
comment = {
|
||||||
|
...comment,
|
||||||
|
json: error.json
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (!ignoreSentry) {
|
if (!ignoreSentry) {
|
||||||
Raven.captureException(error, comment ? { extra: { comment } } : undefined);
|
Raven.captureException(error, comment ? { extra: { comment } } : undefined);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user