mapError<E2> method

ZIO<R, E2, A> mapError<E2>(
  1. E2 f(
    1. E _
    )
)

Transform the failure value of this ZIO using the given function.

Implementation

ZIO<R, E2, A> mapError<E2>(
  E2 Function(E _) f,
) =>
    ZIO.from((ctx) => unsafeRun(ctx).then(
          (ea) => ea.mapFailure(f),
        ));