onApiError

inline fun <T> ApiResult<T>.onApiError(function: (errorBody: ResponseBody?, responseCode: Int) -> Unit): ApiResult<T>