Fetch Helpers
Utility functions for working with fetch operations.
Functions
Section titled “Functions”| Function | Description |
|---|---|
fetchJson | Fetches a URL and returns its parsed JSON body, retrying transient failures. |
fetchOrThrow | Wraps `fetch` so that a non-2xx response rejects with an HttpError, instead of resolving like any other response — the… |
safeFetch | Wraps `fetch` with built-in error handling: returns `null` when the request fails (network error, non-OK status, or par… |
