Fetch JSON from a URL, throwing on non-OK responses.
URL to fetch.
Optional
Optional fetch init options. A signal here is used as-is and replaces the default timeout.
fetch
signal
Per-call options (timeoutMs).
timeoutMs
Parsed JSON response body.
Error with HTTP {status}: {body} message on non-OK responses.
HTTP {status}: {body}
The abort error when the timeout (or the caller's signal) fires.
Fetch JSON from a URL, throwing on non-OK responses.