Vana SDK - v2.2.2
    Preparing search index...

    Function fetchWithFallbacks

    • Fetch content from IPFS with automatic gateway fallbacks

      Edge Cases:

      • Non-IPFS URLs are fetched directly without fallback
      • 10-second timeout per gateway attempt to prevent hanging
      • Rate-limited gateways (429) are skipped immediately
      • Exponential backoff between retries (1s, 2s, 3s, etc.)
      • AbortSignal in options is merged with timeout signal

      Parameters

      • url: string

        The IPFS URL to fetch

      • Optionaloptions: RequestInit

        Optional fetch options

      Returns Promise<Response>

      Promise resolving to Response object

      Error if all gateways fail