recoverWith

abstract fun recoverWith(recover: suspend (Throwable) -> Effect<A>): Effect<A>

Handles errors in this Effect by recovering with another Effect.

Return

A new Effect that recovers from errors with the provided Effect.

Parameters

recover

The function that provides a fallback Effect of type A if the computation fails.