Manifold WASM Developer Guide
    Preparing search index...

    Function fetchWithRetry

    • Wraps fetch with retry-on-transient-failure and throws FetchError on non-2xx. Retries on HTTP 5xx, HTTP 429, and TypeError (network errors like "Failed to fetch"); returns immediately on other 4xx so typo'd URLs fail fast. AbortError and other exceptions propagate untouched.

      Exponential backoff: 200ms, 600ms; ~800ms worst-case added latency.

      Parameters

      • input: RequestInfo | URL
      • Optionalinit: RequestInit

      Returns Promise<Response>