fix(beszel): increase API timeouts to 30s (PocketBase auth is slow)
This commit is contained in:
@@ -87,7 +87,7 @@ async function authenticate(): Promise<string> {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ identity: BESZEL_EMAIL, password: BESZEL_PASSWORD }),
|
||||
signal: AbortSignal.timeout(10_000),
|
||||
signal: AbortSignal.timeout(30_000),
|
||||
})
|
||||
|
||||
if (!resp.ok) throw new Error(`Beszel auth failed: ${resp.status}`)
|
||||
@@ -106,7 +106,7 @@ async function fetchSystems(): Promise<BeszelSystem[]> {
|
||||
|
||||
const resp = await fetch(`${BESZEL_URL}/api/collections/systems/records?limit=100`, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
signal: AbortSignal.timeout(15_000),
|
||||
signal: AbortSignal.timeout(30_000),
|
||||
})
|
||||
|
||||
if (!resp.ok) throw new Error(`Beszel systems fetch failed: ${resp.status}`)
|
||||
|
||||
Reference in New Issue
Block a user