1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Log error json payloads in Sentry

This commit is contained in:
Brett Sun 2016-04-13 10:19:41 +02:00
parent 91cc3c63ff
commit d995dc238b

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