Files
routewatch/internal/server
sneak 090c7c5ba0
check / check (push) Waiting to run
Answer 504, not 408, when a request outlasts its time limit (closes #70)
The hand-written time limit middleware answered 408 and wrote that
answer from its own goroutine while the handler could still be writing.
It is replaced by chi's middleware.Timeout, placed after
JSONResponseMiddleware so its 504 is not lost behind a 200.
JSONValidationMiddleware answers 504 with the JSON error body when the
time limit has passed and the handler wrote nothing. status.json and
/api/v1/stats answer 504 themselves when their 4-second database read
runs out, instead of 408 or an empty answer that became 500.

Model: opus-5-5
2026-10-14 13:17:52 +00:00
..