What: Add request timeout to the ApiClient to prevent hanging requests.
Why: Requests can hang indefinitely if the server doesn't respond. Timeouts ensure the app doesn't get stuck.
Scope: Add timeout parameter to ApiClient methods (default 30s). Use AbortController with setTimeout. Handle timeout error gracefully.
Acceptance criteria:
- Requests timeout after 30s
- Timeout is configurable
- Timeout error is handled
- No hanging requests
Technical context: src/lib/api/client.ts — ApiClient class. src/lib/api/ — API modules.
What: Add request timeout to the ApiClient to prevent hanging requests.
Why: Requests can hang indefinitely if the server doesn't respond. Timeouts ensure the app doesn't get stuck.
Scope: Add
timeoutparameter to ApiClient methods (default 30s). UseAbortControllerwithsetTimeout. Handle timeout error gracefully.Acceptance criteria:
Technical context:
src/lib/api/client.ts— ApiClient class.src/lib/api/— API modules.