Open erikvanoosten opened 1 week ago
Is this a good work-around?
def shouldRetryImmediately(t: Throwable): Boolean = ???
effect
.retryingOnSomeErrors(
isWorthRetrying = (t: Throwable) => Async[F].pure(shouldRetryImmediately(t)),
policy = RetryPolicy(_ => Async[F].pure(PolicyDecision.DelayAndRetry(0.millis))),
onError = logError,
)
.retryingOnAllErrors(policy = ???, onError = logError)
.void
We have use case where we want to retry some errors immediately, other errors cause a regular exponential backoff.
Is there currently a way to do this with cats-retry? If not, could this feature be added?