handleError

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

Handles errors in this Effect by recovering with a default value.

Return

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

Parameters

recover

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