Skip to content

feat(react-router): Add createSentryHandleError #17235

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

Merged
merged 3 commits into from
Jul 31, 2025

Conversation

chargome
Copy link
Member

@chargome chargome commented Jul 30, 2025

closes #17228
closes https://linear.app/getsentry/issue/JS-793/improve-sentry-react-router-steps

This one adds a createSentryHandleError utility function, that can be used like the existing createSentryHandleRequest;

Will need a docs update as well once released.

@chargome chargome self-assigned this Jul 30, 2025
Copy link

linear bot commented Jul 30, 2025

@chargome chargome requested review from Lms24 and andreiborza July 31, 2025 08:24
captureException(error, {
mechanism: {
type: 'react-router',
handled: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to double check: We don't actually know if users handle this error, correct? If so, then handled: false is correct.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically the last point an unhandled error can reach on the server, so this should be fine 👍

@chargome chargome merged commit be4550a into develop Jul 31, 2025
305 of 307 checks passed
@chargome chargome deleted the cg-rr-create-handle-error branch July 31, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Sentry react router steps
2 participants