-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: Try storing error JSON in sentry #4758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,16 @@ if (!config.sentry.dsn.includes('dummy')) { | |
adapter_errors_json: JSON.stringify(error.errors) | ||
} | ||
} | ||
|
||
try { | ||
// Try to store JSON of error for diagnosing bugs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: Expected indentation of 8 spaces but found 16. |
||
event.extra = { | ||
...event.extra, | ||
error_json: JSON.stringify(error) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: Expected indentation of 10 spaces but found 20. |
||
} | ||
} catch { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: Expected indentation of 6 spaces but found 12. |
||
// Ignore error to prevent stackoverflow | ||
} | ||
} | ||
|
||
scope.addEventProcessor(function(event: Sentry.Event, hints: Sentry.EventHint) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Expected indentation of 6 spaces but found 12.