Architect IVR HTTP Request step timing out on custom Express middleware

Problem

IVR flow hits the HTTP Request step and drops a 408 after exactly 5 seconds. GC sits at 2024.3.241.0. Local Express route handles the payload fine, but the prod endpoint won’t respond fast enough according to the logs. Node v18.19.1, Express 4.18.2. JWT validation passes in 30ms. Response includes Content-Type: application/json and a 200 status. Architect still bails.

Code

app.post('/gc/ivr-handoff', async (req, res) => {
 const payload = req.body;
 const queueStatus = await fetchQueueStatus(payload.transfer_queue_id);
 res.status(200).json({ redirect_url: queueStatus.url, meta: { ts: Date.now() } });
});

Error

Architect logs show HTTP Request failed: 408 Request Timeout. Curl from Chicago hits the endpoint in 85ms. WebSocket Notification API stream shows the event firing, but the flow engine doesn’t get the 200 back. Headers look clean. No CORS issues.

Notes

Maybe the Architect engine waits on a specific header shape for IVR handoffs. TLS handshake timing out on the GC side seems likely too. Response body only hits 140 bytes. It’s weird how the flow engine drops it.
{"timestamp":"2024-04-12T14:22:01Z","flow_id":"a8f3k2","status":"timeout","step":"http_request_ivr"}