Commit d8ceec1c authored by Jeff Avallone's avatar Jeff Avallone

Adjusting Sentry integration to include extra info

parent abe7879b
Pipeline #43116868 (#41) failed with stages
in 1 minute and 13 seconds
......@@ -37,7 +37,10 @@ class App extends React.PureComponent {
});
}
catch (e) {
Sentry.captureException(e, { syntax });
Sentry.withScope(scope => {
scope.setExtra('syntax', syntax);
Sentry.captureException(e);
});
this.setState({
loading: false,
loadingError: e
......
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment