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>
12 lines
329 B
JavaScript
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;
|