question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle AggregateErrors

See original GitHub issue

Problem Statement

Hi,

I think both on the JS SDK side and Sentry side things like AggregateError needs to be handled a bit more specifically in a built-in way. Basically AggregateError is a type of error that groups other kinds of errors together and can have an errors property on it, which itself is an array of errors.

On the SDK side: they should be sent in the report request and in the Sentry UI they should be shown in a given error detail page. I think these can be handled in the same or similar way to linked errors.

Also in Python we have ExceptionGroup, in .NET we have AggregateException, and for the languages that does not have this kind of thing directly; something similar can be implemented in the user-land.

Solution Brainstorm

Most probably a new integration like AggregateErrors would do the job on the SDKs sides via both handling the language specific built-in ones and/or allowing custom implementations (so people that dont care about them dont need to enable/add it to their SDK instance).

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
AbhiPrasadcommented, Aug 11, 2022

We’re tracking this at Sentry: https://github.com/getsentry/sentry/issues/37716 as it requires some product changes. Won’t be prioritized anytime soon, but will be in the future!

0reactions
AbhiPrasadcommented, Jul 27, 2022

Hey as an update - we are looking to try to solve this across all the SDKs internally. We’ll update this issue when we have more information related to that!

Read more comments on GitHub >

github_iconTop Results From Across the Web

AggregateError - JavaScript - MDN Web Docs
The AggregateError object represents an error when several errors need to be wrapped in a single error. It is thrown when multiple errors...
Read more >
Exception Aggregation — a new validation pattern - Medium
“Exception Aggregation” is a good way to handle errors without breaking the continuity of code execution as it combines the best of both...
Read more >
coding standards - Should I Aggregate Web API Errors?
One solution would be to aggregate errors found, then simply inform users of what is considered valid input data. In the example of...
Read more >
sindresorhus/aggregate-error: Create an error from ... - GitHub
Create an error from multiple errors. Contribute to sindresorhus/aggregate-error development by creating an account on GitHub.
Read more >
Anti-Pattern to aggregate errors and pass to promise resolve js?
async function doSomething(list) { const errors = []; for (let item of list) { try { await actionThatThrows(item); } catch (e) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found