Skip to content
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

Track DOMException.name instead of DOMException.code #10501

Open
behnam-oneschema opened this issue Feb 5, 2024 · 4 comments
Open

Track DOMException.name instead of DOMException.code #10501

behnam-oneschema opened this issue Feb 5, 2024 · 4 comments

Comments

@behnam-oneschema
Copy link

Problem Statement

DOMException.code is a deprecated feature. Reference: https://developer.mozilla.org/en-US/docs/Web/API/DOMException

The codes are also hardly practical, considering only the numeric value of them is shown in the Sentry UI:
image

Solution Brainstorm

DOMException.name is the current best-practice in identifying these errors, and is supported widely across browsers:

image

@AbhiPrasad
Copy link
Member

Hey @behnam-oneschema, this is something we might do for our v8 version (#9508), adding it to our milestone!

@AbhiPrasad AbhiPrasad added this to the 8.0.0 milestone Feb 6, 2024
@AbhiPrasad
Copy link
Member

So taking another look at this - shouldn't DOMException.name show up as the error type? Which you can search for via error.type.

@behnam-oneschema
Copy link
Author

Yeah, indeed it looks like DOMException.name is being indexed already as error.type. Although, It's not shown on the error details page, in contrast to DOMException.code.

@lforst
Copy link
Member

lforst commented Feb 23, 2024

@behnam-oneschema right. We are setting code as a tag on the event. This is why it shows up in that heatmap on the issues page.

Having this as a tag makes very little sense, as all the errors that are grouped together likely have the same tag value. We should some sort of context instead probably. (Side-note: having type as a tag would equally not make any sense for the same reason)

@AbhiPrasad I think the TODO for us here is to move this into a context or data field.

@AbhiPrasad AbhiPrasad modified the milestones: 8.0.0, 9.0.0 Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants