Skip to content

Conversation

@lobsterkatie
Copy link
Member

Inspired by #4156 - h/t @nowylie.

According to the spec, all DOMExceptions should also be Errors (and therefore potentially have a stacktrace), though this isn't universally followed. In the cases in which it is, we should be capturing that stack.

Fixes #4085
Fixes #3119

@github-actions
Copy link
Contributor

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 22.49 KB (+0.06% 🔺)
@sentry/browser - Webpack 23.37 KB (+0.06% 🔺)
@sentry/react - Webpack 23.4 KB (+0.05% 🔺)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.93 KB (+0.05% 🔺)

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

💯

@lobsterkatie lobsterkatie merged commit c886062 into master Nov 15, 2021
@lobsterkatie lobsterkatie deleted the kmclb-capture-stacktrace-on-domexceptions branch November 15, 2021 18:32
onurtemizkan pushed a commit that referenced this pull request Dec 19, 2021
Inspired by #4156 - h/t @nowylie.

According to the spec[1], all `DOMExceptions` should also be `Error`s (and therefore potentially have a stacktrace), though this isn't universally followed. In the cases in which it is, we should be capturing that stack.

Fixes #4085
Fixes #3119

[1] https://webidl.spec.whatwg.org/#es-DOMException-specialness
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.

Stack trace lost when capturing DOMException The stack trace of a SecurityError is not reported

3 participants