Skip to content

Linked exceptions and which is used for grouping? #59679

@Parakoos

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

Metadata

Metadata

Assignees

Projects

Status

No status

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions