Skip to content

fix(browser): Add a synthetic stack trace to DOMException with empty stack traces if attachStacktrace is true#19988

Open
abcang wants to merge 1 commit intogetsentry:developfrom
abcang:abcang/add_synthetic_stack_trace_to_dom_exception
Open

fix(browser): Add a synthetic stack trace to DOMException with empty stack traces if attachStacktrace is true#19988
abcang wants to merge 1 commit intogetsentry:developfrom
abcang:abcang/add_synthetic_stack_trace_to_dom_exception

Conversation

@abcang
Copy link

@abcang abcang commented Mar 26, 2026

DOMException may not always contain a stack trace. Depending on the browser, the stack property might be missing entirely, or it might be set to an empty string.

This PR ensures that empty strings are handled in the same way as missing properties.

For example, when a NotAllowedError occurs during WebAuthn usage, I confirmed that Chrome does not have the stack property, whereas Safari provides it as an empty string.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 26, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (node) Add nodeRuntimeMetricsIntegration by chargome in #19923
  • (nuxt) Support parametrized SSR routes in Nuxt 5 by s1gr1d in #19977

Bug Fixes 🐛

  • (browser) Add a synthetic stack trace to DOMException with empty stack traces if attachStacktrace is true by abcang in #19988
  • (opentelemetry) Convert seconds timestamps in span.end() to milliseconds by logaretm in #19958

Documentation 📚

  • (release) Update publishing-a-release.md by nicohrubec in #19982

Internal Changes 🔧

  • (core) Consolidate getOperationName into one shared utility by nicohrubec in #19971
  • (deno) Expand Deno E2E test coverage by chargome in #19957

🤖 This preview updates automatically when you update the PR.

Copy link

@cursor cursor bot left a comment

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.

@abcang abcang force-pushed the abcang/add_synthetic_stack_trace_to_dom_exception branch from c0587f3 to 9bd8786 Compare March 26, 2026 11:23
@abcang abcang force-pushed the abcang/add_synthetic_stack_trace_to_dom_exception branch from 9bd8786 to f16b753 Compare March 26, 2026 11:25
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.

1 participant