withRetryPolicy

suspend fun <T> withRetryPolicy(retryPolicy: RetryPolicy, block: suspend CoroutineScope.() -> T): T

Runs block with retryPolicy in place of each NetworkClient's configured retry policy, e.g. withRetryPolicy(RetryPolicy.None) { client.request<User>(endpoint) } for exactly one attempt.


suspend fun <T> withRetryPolicy(retryPolicy: RetryPolicy, awaitReachabilityBeforeRequest: Boolean, block: suspend CoroutineScope.() -> T): T

Runs block with retryPolicy, optionally waiting for each request's configured connectivity gate before its initial attempt. The wait uses that client's configured time bound, remains cancellable, and is skipped when the client has no gate.

Outer retry loops such as MutationQueue use RetryPolicy.None with awaitReachabilityBeforeRequest enabled to retain connectivity waiting without nested retries.