Praman — AI-First SAP UI5 Test Automation Platform - v1.0.1
    Preparing search index...

    Function retry

    • Retries an async operation with exponential backoff + jitter.

      Type Parameters

      • T

      Parameters

      • fn: () => Promise<T>

        Async function to attempt.

      • Optionaloptions: RetryOptions

        Retry configuration.

      Returns Promise<T>

      The result of fn on success.

      WARNING: retry() is for infrastructure only — config loading, OTel init, bridge injection. Do NOT use for UI interactions — use Playwright's native auto-retry or waitForUI5Stable() instead.

      The last error after all retries are exhausted.

      const result = await retry(
      () => fetchWithTimeout('/api/data'),
      { maxRetries: 3, baseDelay: 200, shouldRetry: (err) => err.message !== 'AUTH_FAILED' },
      );