1
0
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:
Brett Sun 2016-04-13 10:45:33 +02:00
commit 80a63e1c8c

View File

@ -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);
}