Handling Aggregate Errors in TypeScript: Best Practices and Utilities
Is there a "blessed" way and/or convenience utilities for dealing with "aggregate" errors?
For instance, I'm using
I'd like to deal with errors upstream, but that
I'm fine making some bespoke "
For instance, I'm using
Effect.partition to decode data / execute a side-effect, and I get back a type ofI'd like to deal with errors upstream, but that
(ParseError | NotifyError)[] type doesn't feel very friendly to send up raw through the error channel.I'm fine making some bespoke "
AggregateError" tagged error class that can encapsulate the list of errors. But I've run into this kind of thing a couple times now, and I'm curious if there are any conventions I might be missing for these kinds of situations?