Jorge Domínguez
08/08/2023, 11:31 PMretryOnExceptionIf
where I get a CancellationException
instead of a HttpRequestTimeoutException
when a timeout happens. This is preventing me from retrying timed out requests and using retryOnException(… retryOnTimeout = true)
doesn’t seem to work either. There seems to be mention of this already here, but I can’t find a solution. Is this a known issue?Aleksei Tirman [JB]
08/09/2023, 6:57 AMJorge Domínguez
08/09/2023, 3:32 PMretryOnExceptionIf
does get a HttpRequestTimeoutException
. It’s worth noting that the cause
property of the CancellationException
I get is of type HttpRequestTimeoutException
, does that hint something? also I’m using Charles proxy in my project to simulate the timeoutAleksei Tirman [JB]
08/10/2023, 7:11 AMval killer = scope.launch {
delay(requestTimeout)
val cause = HttpRequestTimeoutException(request)
LOGGER.trace("Request timeout: ${request.url}")
executionContext.cancel(cause.message!!, cause)
}
Jorge Domínguez
08/10/2023, 2:42 PMHttpRequestTimeoutException
or a CancellationException
?Aleksei Tirman [JB]
08/11/2023, 7:54 AM