collabSupport/utils/fetchWithTimeout.js
jmcqueen 5e54ea6f57 Add /atlasdiag live AZM diagnostic with source alerts and monitor auto-off.
Ports Atlas /check as /atlasdiag: Hub resolve, UI tunnel, WebSocket report
for sources/zones/accessories, low source dB warnings, and auto-disable of
the monitor speaker when left on after troubleshooting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 17:59:17 -04:00

12 lines
329 B
JavaScript

// utils/fetchWithTimeout.js
// Native fetch wrapper with AbortSignal timeout (Node 20+).
export async function fetchWithTimeout(url, options = {}, timeoutMs = 15000) {
const response = await fetch(url, {
...options,
signal: AbortSignal.timeout(timeoutMs),
});
return response;
}
export default fetchWithTimeout;