/** * A more powerful version of `mapError` which also surfaces the `Cause` * of the channel failure. * * @tsplus static effect/core/stream/Channel.Aspects mapErrorCause * @tsplus pipeable effect/core/stream/Channel mapErrorCause */ export function mapErrorCause( f: (cause: Cause) => Cause ) { return ( self: Channel ): Channel => self.catchAllCause((cause) => Channel.failCause(f(cause))) }