executeWithRetry

suspend fun <T> executeWithRetry(block: suspend () -> T): T

Executes a suspend function with retry logic.

Interruption policy: java.io.InterruptedIOException (excluding java.net.SocketTimeoutException) is always rethrown immediately, regardless of retryableExceptions or nonRetryableExceptions configuration. It signals thread interruption and must not be swallowed or retried. java.net.SocketTimeoutException is a subclass of java.io.InterruptedIOException but represents a transient network condition and is allowed to follow the normal retry path.

Return

The result of the function

Parameters

block

The suspend function to execute

Throws

The last exception if all retries are exhausted