Skip to main content

ICARetryPolicy

@spartanfx/react v1.2.2


@spartanfx/react / codeapps / ICARetryPolicy

Interface: ICARetryPolicy

Retry/backoff policy applied to mutations (create/update/delete) and idempotent reads. Retries are skipped for 4xx errors except 408/429.

Properties

Options

PropertyTypeDescription
baseDelayMs?numberBase delay between retries in ms (default: 250).
maxAttempts?numberMaximum retry attempts (default: 3).
maxDelayMs?numberMaximum backoff cap in ms (default: 8000).

Events & callbacks

PropertyTypeDescription
shouldRetry?(error, attempt) => booleanPredicate to decide whether an error is retryable. Defaults to retry on network errors, 408, 429, and 5xx.