A handler's panic is logged and counted as 500 (closes #125) #133

Merged
clawbot merged 1 commits from issue-125-panic-logged-as-500 into next 2026-10-14 13:30:12 +02:00
1 Commits
Author SHA1 Message Date
clawbot 16f7b917d7 A handler's panic is logged and counted as 500 (closes #125)
check / check (push) Waiting to run
Recoverer comes first, so it wrote the 500 only after the panic had
passed the request log and the metrics, which both recorded 200.
Write500OnPanic, placed after the request log and after the metrics,
writes the 500 as the panic passes and panics again, so Sentry and
Recoverer still get it. Recoverer now writes its 500 only when no
status was written, so the server logs no superfluous WriteHeader call.
The test also requires Recoverer's log line for the handler's panic, so
it fails if Write500OnPanic stops passing the panic on.

Model: opus-5-5
2026-10-14 11:03:07 +00:00