Skip to content

feat(browser)!: Send session status unhandled instead of crashed for unhandled errors#22475

Merged
msonnb merged 5 commits into
developfrom
ms/session-status-unhandled
Jul 22, 2026
Merged

feat(browser)!: Send session status unhandled instead of crashed for unhandled errors#22475
msonnb merged 5 commits into
developfrom
ms/session-status-unhandled

Conversation

@msonnb

@msonnb msonnb commented Jul 22, 2026

Copy link
Copy Markdown
Member

continuation of #17849

Unhandled errors don't actually crash the browser, so browser sessions now
report the new unhandled status instead of crashed. Node/server sessions
are unchanged and continue to use crashed.

closes #17842

@msonnb

msonnb commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6ba3cd5. Configure here.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.78 kB +0.1% +26 B 🔺
@sentry/browser - with treeshaking flags 26.22 kB +0.1% +26 B 🔺
@sentry/browser (incl. Tracing) 46.61 kB +0.05% +23 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.42 kB +0.05% +22 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.41 kB +0.05% +22 B 🔺
@sentry/browser (incl. Tracing, Replay) 85.85 kB +0.03% +21 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.5 kB +0.04% +25 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 90.58 kB +0.03% +24 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 103.24 kB +0.03% +21 B 🔺
@sentry/browser (incl. Feedback) 44.97 kB +0.06% +24 B 🔺
@sentry/browser (incl. sendFeedback) 32.58 kB +0.08% +25 B 🔺
@sentry/browser (incl. FeedbackAsync) 37.64 kB +0.06% +22 B 🔺
@sentry/browser (incl. Metrics) 28.86 kB +0.1% +27 B 🔺
@sentry/browser (incl. Logs) 29.09 kB +0.11% +31 B 🔺
@sentry/browser (incl. Metrics & Logs) 29.79 kB +0.09% +25 B 🔺
@sentry/react 29.57 kB +0.08% +23 B 🔺
@sentry/react (incl. Tracing) 48.89 kB +0.04% +18 B 🔺
@sentry/vue 33.21 kB +0.09% +28 B 🔺
@sentry/vue (incl. Tracing) 48.58 kB +0.04% +19 B 🔺
@sentry/svelte 27.8 kB +0.1% +26 B 🔺
CDN Bundle 30.12 kB +0.06% +17 B 🔺
CDN Bundle (incl. Tracing) 48.5 kB +0.03% +12 B 🔺
CDN Bundle (incl. Logs, Metrics) 31.7 kB +0.07% +20 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 49.8 kB +0.04% +15 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 70.96 kB +0.03% +19 B 🔺
CDN Bundle (incl. Tracing, Replay) 86.01 kB +0.03% +18 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.33 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 91.82 kB +0.02% +14 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.08 kB +0.02% +16 B 🔺
CDN Bundle - uncompressed 89.75 kB +0.05% +36 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 146.63 kB +0.03% +36 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.47 kB +0.04% +36 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.61 kB +0.03% +36 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.23 kB +0.02% +36 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.87 kB +0.02% +36 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.83 kB +0.02% +36 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.57 kB +0.02% +36 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.53 kB +0.02% +36 B 🔺
@sentry/nextjs (client) 51.4 kB +0.04% +19 B 🔺
@sentry/sveltekit (client) 47.03 kB +0.06% +28 B 🔺
@sentry/core/server 80.14 kB +0.02% +9 B 🔺
@sentry/core/browser 51.99 kB +0.03% +14 B 🔺
@sentry/node 124.27 kB +0.02% +18 B 🔺
@sentry/node (incl. diagnostics channel injection) 149.7 kB +0.02% +18 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB - -
@sentry/node - without tracing 74.44 kB +0.03% +15 B 🔺
@sentry/aws-serverless 83.92 kB +0.03% +21 B 🔺
@sentry/cloudflare (withSentry) - minified 196.64 kB +0.03% +58 B 🔺
@sentry/cloudflare (withSentry) 483.92 kB +0.02% +77 B 🔺

View base workflow run

@msonnb
msonnb marked this pull request as ready for review July 22, 2026 11:06
@msonnb
msonnb requested a review from a team as a code owner July 22, 2026 11:06
@msonnb
msonnb requested review from Lms24 and logaretm and removed request for a team July 22, 2026 11:06

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM in terms of behaviour!

One suggestion: To save some bytes of bundle size, WDYT about storing the respective status as a property instead of a method?

@msonnb

msonnb commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

One suggestion: To save some bytes of bundle size, WDYT about storing the respective status as a property instead of a method?

yup makes sense! updated in d8f97f4

Comment thread packages/core/src/client.ts Outdated
if (shouldUpdateAndSend) {
updateSession(session, {
...(crashed && { status: 'crashed' }),
...(crashed && { status: this._unhandledSessionStatus }),

@Lms24 Lms24 Jul 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

last nit (feel free to ignore): Can we name this variable unhandled? Kinda goes nicer with where we take if from (event mechanism.handled) and with the _unhandledSessionStatus property

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 62ba930. Configure here.

Comment thread paseo.json Outdated
@msonnb
msonnb merged commit 189afce into develop Jul 22, 2026
285 checks passed
@msonnb
msonnb deleted the ms/session-status-unhandled branch July 22, 2026 15:47
msonnb added a commit that referenced this pull request Jul 22, 2026
Attribution for original work in
#17849, continued in
#22475
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.

Assign status unhandled instead of crashed to sessions in browser SDK

2 participants