RetryConfig constructor
const
RetryConfig({})
Creates a new retry configuration.
maxRetries - Maximum number of retry attempts. Default is 3.
baseDelayMs - Base delay between retries in milliseconds. Default is 1000ms (1 second).
maxDelayMs - Maximum delay between retries in milliseconds. Default is 10000ms (10 seconds).
retryableExceptions - List of exception types that should trigger a retry.
Default includes network errors, timeouts, and server errors.
Implementation
const RetryConfig({
this.maxRetries = 3,
this.baseDelayMs = 1000,
this.maxDelayMs = 10000,
this.retryableExceptions = const [
CivitaiNetworkException,
CivitaiTimeoutException,
CivitaiServerException,
],
});