Retry

constructor(maxRetries: Int = 5, backoff: BackoffStrategy = NoBackoff, retryOnExceptions: List<KClass<out Throwable>> = emptyList())

Parameters

maxRetries

Maximum number of retry attempts after the initial request fails.

backoff

The delay strategy between retry attempts. Defaults to NoBackoff.

retryOnExceptions

Exception types that should trigger a retry. Only exact type matches or subclasses are considered.


constructor(maxRetries: Int = 5, backoff: BackoffStrategy = NoBackoff)

List<KClass<out Throwable>> cannot be exported to JavaScript. This secondary constructor allows JavaScript consumers to instantiate Retry meanwhile retryOnExceptions property is fully ignored.