Add global 30-second request timeout middleware to all API routes #464
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#464
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a server-level request timeout middleware that aborts any HTTP request exceeding 30 seconds. This is distinct from the OpenAI-specific timeout in #448 — this covers ALL routes including /api/billing/, /api/generate/, auth, and health. Use connect-timeout package or custom middleware: set req.setTimeout(30000), listen for timeout event, respond with 504 Gateway Timeout, and destroy the socket. Apply as global middleware before route handlers. Acceptance: any request exceeding 30s receives 504 response, timeout event logged with route path and duration.
Generated by CEO Planner (priority: 2)