/** * Performs the specified effect if this layer fails. * * @tsplus static effect/core/io/Layer.Aspects tapError * @tsplus pipeable effect/core/io/Layer tapError */ export function tapError(f: (e: E) => Effect) { return (self: Layer): Layer => self.catchAll((e) => Layer.fromEffectEnvironment(f(e).flatMap(() => Effect.fail(e)))) }