//arrow-fx-coroutines/arrow.fx.coroutines/CircuitBreaker/protectEither

protectEither

common suspend fun <A> protectEither(fa: suspend () -> A): Either<CircuitBreaker.ExecutionRejected, A>

Returns a new task that upon execution will execute the given task, but with the protection of this circuit breaker. If an exception in fa occurs, other than an ExecutionRejected exception, it will be rethrown.

Do you like Arrow?

Arrow Org
<