WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Support aggregated errors (aka. AggregateError) #4000

@mortargrind

Description

@mortargrind

JavaScript has AggregateError (see); which is a type of an error that can hold many different sibling errors at the same time. It's similar to Error.cause property but Aggregated error can have many "cause"s at the same time, not sequentially linked to on another but all parallel to each other.

Many languages have a similar concept, under slightly different names like ExceptionGroup in Python or AggregateException in C#.

Currently, when you report AggregateError, you do not see anything regarding the underlying errors. Which forces us to report errors in a loop individually.

While this is better than nothing, it'd be great to have the aggregated error support so you can have a single error report with a high-level error type (is an AggregateError or extending from AggregateError) and/or with a specific error message so you can do things like counting the instance of failures, not number of underlying errors etc.

This is similar to supporting linked errors via cause property, but slightly different as it's not a "vertical" connection but instead a "horizontal" one.

Linking Sentry issue (https://github.com/getsentry/rfcs/blob/main/text/0079-exception-groups.md) here because I believe almost everything in that issue description & comments is true for DataDog too.

As mentioned in that ticket, this probably requires changes in the product & its UI too, not just in the SDK. I am openning the issue here anyways for visibility for other people who might need the same feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions