tryRecover

@JvmName(name = "tryRecoverTyped")
infix inline fun <T : Exception, R> ApiResult<R>.tryRecover(block: (T) -> R): ApiResult<R>

calls recover catching and wrapping any exceptions thrown inside block.


infix inline fun <T> ApiResult<T>.tryRecover(block: (e: Exception) -> T): ApiResult<T>

Calls recover catching and wrapping any exceptions thrown inside block.

See also the typed version of this function to recover from a specific exception type