Files
outline/server/storage
Tom MoorandClaude Opus 5 58e62c9a42 fix: Statement timeouts reported as 404 (#13300)
* fix: Statement timeouts reported as 404

A Postgres statement_timeout was set to exactly REQUEST_TIMEOUT, so the
socket was destroyed by the server timeout at the same moment the query
was canceled. The error handler could no longer write a response, leaving
Koa's placeholder 404 status for logging and tracing to report, while the
client saw a reset connection.

The statement timeout is now set below the request timeout so the response
can be delivered, canceled queries return a 503, and the status code is
corrected even when the response can no longer be written.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix: Statement timeout floor could exceed the request timeout

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 21:43:27 -04:00
..
2026-08-03 22:26:45 -04:00