onSuccess

inline suspend fun <T, R> IntermediateResult<R>.onSuccess(block: T.(response: HttpResponse) -> R): R(source)

Helper method to perform error handling on ktor responses, see onFailure.