Implement fetchWithTimeout(fetch, url, ms)
Plain fetch has no built-in timeout, a hung server can leave you waiting forever. Write fetchWithTimeout(fetch, url, ms) that aborts the request via AbortController if it hasn't settled within ms, and rejects with an error whose message mentions the timeout.
await fetchWithTimeout(fetch, "/slow-endpoint", 3000);
// rejects with an error like "Request timed out after 3000ms" if it takes longer