-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix/sentry crash modal #926
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
…client.ts Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
This PR adds automatic error reporting dialog functionality to the Sentry client initialization. The change implements a beforeSend
hook that displays Sentry's report dialog whenever an exception occurs, allowing users to provide additional context about errors.
- Adds a
beforeSend
hook to show Sentry report dialog on exceptions - Includes error handling to prevent the error reporting mechanism from causing additional errors
libraries/react-shared-libraries/src/sentry/initialize.sentry.client.ts
Outdated
Show resolved
Hide resolved
} catch (err) { | ||
// Prevent error reporting from causing its own errors | ||
// Optionally log the error for debugging | ||
// console.error('Failed to show Sentry report dialog:', err); |
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.
According to the project's Sentry logging guidelines, error logging should use Sentry's structured logger instead of console.error. Consider using logger.error()
from Sentry with appropriate context if this line is uncommented.
Copilot generated this review using guidance from copilot-instructions.md.
…client.ts Co-authored-by: Copilot <[email protected]>
What kind of change does this PR introduce?
eg: Bug fix, feature, docs update, ...
Why was this change needed?
Please link to related issues when possible, and explain WHY you changed things, not WHAT you changed.
Other information:
eg: Did you discuss this change with anybody before working on it (not required, but can be a good idea for bigger changes). Any plans for the future, etc?
Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;