Fix a bug where the app wouldn't retry when the server rate-limits its requests. (#5022)

Change the retry limit to 3.

Without this the SDK immediately fails when rate-limited instead of waiting and trying again.
This commit is contained in:
Doug
2026-01-30 10:37:23 +00:00
committed by GitHub
parent 7fbb0bb86c
commit 1c738c4457
@@ -27,7 +27,7 @@ extension ClientBuilder {
.setSessionDelegate(sessionDelegate: sessionDelegate)
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
.threadsEnabled(enabled: threadsEnabled, threadSubscriptions: threadsEnabled)
.requestConfig(config: .init(retryLimit: 0,
.requestConfig(config: .init(retryLimit: 3, // Must be non-zero for the SDK to retry API calls when rate-limited.
timeout: requestTimeout,
maxConcurrentRequests: nil,
maxRetryTime: maxRequestRetryTime))