retryEither

inline suspend fun <Error, Result, Output> Schedule<Error, Output>.retryEither(action: () -> Either<Error, Result>): Either<Error, Result>(source)

Retries action using any Error that occurred as the input to the Schedule. It will return the last Error if the Schedule is exhausted, and ignores the output of the Schedule.