From 13708fce8e50bef4e0b7a9ddf7120f942bc03e07 Mon Sep 17 00:00:00 2001 From: gnezim Date: Sat, 18 Apr 2026 13:41:40 +0300 Subject: [PATCH] Raise ApiClient default timeout to 30s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The upstream /schedule endpoint regularly returns 7MB+ payloads and takes 6-10s to complete. The 5s default was aborting those fetches mid-body, cascading into a retry loop that showed ERR_ABORTED in DevTools and 'Failed to load data' on the UI — even though the backend eventually answered with HTTP 200. Matches Angular's default. --- src/shared/api/client.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/api/client.ts b/src/shared/api/client.ts index 48e90d91..c183dfef 100644 --- a/src/shared/api/client.ts +++ b/src/shared/api/client.ts @@ -36,7 +36,11 @@ export class ApiClient { this.locale = options.locale; this.traceId = options.traceId; this.fetchFn = options.fetchImpl ?? globalThis.fetch.bind(globalThis); - this.timeoutMs = options.defaultTimeoutMs ?? 5000; + // Upstream schedule endpoint regularly returns 7MB+ payloads over + // a slow WAF-protected connection and can take 8–10 seconds in + // dev. 5s was far too aggressive — the fetch would abort mid-body + // and cascade into retry loops. 30s matches Angular's default. + this.timeoutMs = options.defaultTimeoutMs ?? 30_000; this.maxRetries = options.retry?.maxRetries ?? 3; this.timeoutFactor = options.retry?.timeoutFactor ?? 2; this.retryStatusCodes = new Set(