SpotifyRetryConfig

constructor(maxRetries: Int = 3, retryOnRateLimit: Boolean = true, retryOnConnectionException: Boolean = true, retryOnServerErrorsForSafeMethods: Boolean = true, respectRetryAfterHeader: Boolean = true, baseDelayMillis: Long = 500, maxDelayMillis: Long)

Parameters

maxRetries

Maximum number of retry attempts per request.

retryOnRateLimit

Retry on HTTP 429 (Too Many Requests) responses.

retryOnConnectionException

Retry when the request fails before a response is received (for example connection refused or DNS failure).

retryOnServerErrorsForSafeMethods

Retry on HTTP 5xx responses, but only for idempotent methods (GET/PUT/DELETE). A 5xx on POST (for example queueing a track) is never retried, since that could double-execute a non-idempotent operation.

respectRetryAfterHeader

Honor the Retry-After response header when present instead of the exponential backoff delay.

baseDelayMillis

Base delay used by the exponential backoff between retries.

maxDelayMillis

Upper bound applied to the computed retry delay.