recover

@JvmName(name = "recoverTyped")
infix inline fun <T : Exception, R> ApiResult<R>.recover(another: (e: T) -> ApiResult<R>): ApiResult<R>

Recover from an exception of type R, else no-op. Does not affect Loading.

Overload for a lambda that already returns an ApiResult.

See also


infix inline fun <T> ApiResult<T>.recover(another: (e: Exception) -> ApiResult<T>): ApiResult<T>

Recover from an exception. Does not affect Loading See also the typed version of this function to recover from a specific exception type