mapError

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

Change the exception of the Error response without affecting loading/success results


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

Map the exception of the Error state, but only if this exception is of type R. Loading and Success are unaffected