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

Add AggregateError supprt #297

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shortercode
Copy link

Relates to #294. Implements support for the relatively new but widely supported AggregateError type. This is a subclass of Error which supports passing an array of child errors. As an example this is useful if you need to make a series of network requests to load a page, you can return a single error which captures all the related failures.

I figured this would be more controversial than the #296 change so separated the 2. This duplicates some of the changes but only to provide complete implementation for this MR. I thought it best to introduce it as a separate transformer for backwards compatibility.

Adds type check for AggregateError

@shortercode shortercode requested a review from Skn0tt as a code owner September 16, 2024 17:43
Copy link
Collaborator

@Skn0tt Skn0tt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I'm generally supportive of this addition. Could you add some tests for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants