onError

inline fun <T> ApiResult<T>.onError(function: (throwable: Throwable) -> Unit): ApiResult<T>