You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add fetch timeouts to all frontend API proxy routes #1001
All frontend Next.js API proxy routes (under components/frontend/src/app/api/) call fetch() to proxy requests to the backend without any timeout configured. If the backend is unresponsive, these requests can hang indefinitely, blocking the Next.js server handler and degrading the user experience.
There are approximately 85+ route files affected (e.g. cluster-info/route.ts, version/route.ts, projects/route.ts, and many more).
Proposed Solution
Add a consistent timeout mechanism across all proxy routes. Options include:
Use AbortController with setTimeout and pass signal to fetch(), returning a 504 response on abort.
Extract a shared fetchWithTimeout utility (e.g. in components/frontend/src/lib/) to keep the implementation DRY and consistent across all routes.
Decide on a sensible default timeout (e.g. 10–30 seconds) appropriate for the backend SLAs.
The catch block in each route should distinguish AbortError (timeout → 504) from other errors (→ 500).
Context
Identified during review of PR #998 (comment: #998 (comment)). Adding a timeout to only version/route.ts in isolation was intentionally deferred to keep that PR focused; a follow-up addressing all routes consistently is the right approach.
Hey there! 👋 Closing this out as part of a triage pass — it's been idle for a while and we want to keep the backlog focused. If this is still relevant or you'd like to pick it back up, feel free to reopen anytime. Thanks!
Activity
jeremyeder commentedon Apr 17, 2026
Hey there! 👋 Closing this out as part of a triage pass — it's been idle for a while and we want to keep the backlog focused. If this is still relevant or you'd like to pick it back up, feel free to reopen anytime. Thanks!