Skip to content

Linked exceptions and which is used for grouping? #59679

Closed
getsentry/sentry-javascript
#10850

Description

@Parakoos

Environment

SaaS (https://sentry.io/)

What are you trying to accomplish?

When playing a sound, I wrap the code in a try-catch and if I get a NotAllowedError then I catch it and wrap it in my own kind of error, with a more meaningful error message: throw new SgtError('Permission to play sounds not given.', caughtError) (where the constructor will set the cause property to the given error)

In Sentry, I can see the two errors:

Related Exceptions
    SgtError: Permission to play sounds not given.
        NotAllowedError: Permission was denied

BUT! And here is my problem, all the grouping, fingerprinting and the title and error message of the Sentry issue are all based on the underlying NotAllowedError.

This becomes a problem when in a different part of the code, I try to set the Wake Lock and that operation also throws NotAllowedError and so when I wrap that in a different custom error with a different message, the sound-related issues are all mixed up with the wake-lock issues, since the underlying error is the same, and the 'parent error' is ignored.

How are you getting stuck?

I would like to be able to signal to Sentry to focus on the main error instead of the linked error. Is there a way to do this? I am already using beforeSend to set custom finger prints for these errors, but... it seems clumsy and I can't seem to find a way to fix other things like title and description in the UI.

Where in the product are you?

Unknown

Link

No response

DSN

No response

Version

No response

┆Issue is synchronized with this Jira Improvement by Unito

Activity

  1. getsantry commented on Nov 9, 2023

    @getsantry
    Contributor

    Assigning to @getsentry/support for routing ⏲️

  2. moved this to Waiting for: Support in GitHub Issues with 👀on Nov 9, 2023
  3. getsantry commented on Nov 9, 2023

    @getsantry
    Contributor

    Routing to @getsentry/product-owners-unknown for triage ⏲️

  4. moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀on Nov 9, 2023
  5. getsantry commented on Nov 14, 2023

    @getsantry
    Contributor

    Routing to @getsentry/product-owners-issues for triage ⏲️

  6. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Nov 14, 2023
  7. 40 remaining items

  8. lobsterkatie commented on Jan 31, 2024

    @lobsterkatie
    Member

    After more investigation, @AbhiPrasad and I agreed that the change actually should come in the SDK.

    It's currently marking linked errors as exception groups, when that designation should be reserved for instances of AggregateError (as confirmed in our event schema here). When grouping events, we ignore the top error of an exception group because it's just a container, and since the top error in a chain of errors is getting designated incorrectly, we're therefore incorrectly ignoring it.

    We'll post an update when we have news on that fix.

  9. andrewmclagan commented on Feb 26, 2024

    @andrewmclagan

    @lobsterkatie Will second how crippling this issue is, considering this is a costly paid service and this issue renders the service almost pointless. I would expect this issue to receive a very high priority, its been open for months.

  10. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Feb 26, 2024
  11. AbhiPrasad commented on Feb 26, 2024

    @AbhiPrasad
    Contributor

    Hey folks - we've been busy working on our new major version for the JS SDK, which has been our primary focus.

    Apologies for the delay, we'll bump this up in priority

  12. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Feb 26, 2024
  13. AbhiPrasad commented on Mar 4, 2024

    @AbhiPrasad
    Contributor
  14. locked and limited conversation to collaborators on Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component: GroupingProduct Area: IssuesSync: Jira

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions