Adjusting Sentry integration to include extra info

This commit is contained in:
Jeff Avallone
2019-01-12 13:30:02 -05:00
parent abe7879b08
commit d8ceec1c07
2 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -14,7 +14,11 @@ class SentryBoundary extends React.Component {
}
componentDidCatch(error, errorInfo) {
Sentry.captureException(error, errorInfo);
Sentry.withScope(scope => {
Object.keys(errorInfo).forEach(key =>
scope.setExtra(key, errorInfo[key]));
Sentry.captureException(error);
});
}
render() {