GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Execute operation with retry logic

      Type Parameters

      • T

      Parameters

      • operation: () => Promise<T>

        Async operation to execute

      • Optionaloptions: RetryOptions = {}

        Retry options

        • signal

          Abort signal

        • maxAttempts

          Override the TOTAL attempt budget

        • resourceName

          Resource name for logging

      Returns Promise<T>

      Operation result

      If every attempt fails

      // 5 attempts = 1 initial try + 4 retries.
      const result = await RetryHandler.retry(
      async () => await fetch(url),
      { maxAttempts: 5, resourceName: 'icon.svg' }
      );