retryOnExceptionIf
fun retryOnExceptionIf(maxRetries: Int = -1, block: HttpRetryShouldRetryContext.(HttpRequestBuilder, Throwable) -> Boolean)(source)
Specifies retry logic for failed requests. The block accepts HttpRequestBuilder and Throwable and should return true if this request should be retried. Note that, to retry on timeout exceptions, HttpTimeout plugin should be installed after HttpRequestRetry.
val retryOnExceptionIf: HttpRetryShouldRetryContext.(HttpRequestBuilder, Throwable) -> Boolean?(source)
Function that determines whether a request should be retried based on the exception.