retryHandlers.tsx 225 B

1234567
  1. export function shouldRetryHandler(failureCount: number, error: Error) {
  2. return failureCount < 3 && error.message.includes('429');
  3. }
  4. export function getRetryDelay(attempt: number) {
  5. return 1000 * Math.pow(3, attempt);
  6. }