A handler's panic is logged and counted as 500 (closes #125)
check / check (push) Successful in 2m3s
check / check (push) Successful in 2m3s
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. Model: opus-5-5
This commit is contained in:
@@ -22,6 +22,12 @@ Decide whether the repo moves to the layout `REPO_POLICIES.md` gives, with
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-14: a request whose handler panics is logged with status 500 and
|
||||
counted with `code` 500 in the metrics
|
||||
([#125](https://git.eeqj.de/sneak/netwatch/issues/125)), not 200. `Recoverer`
|
||||
is still the first middleware; `Write500OnPanic`, after the request log and
|
||||
after the metrics, writes the 500 as the panic passes and lets it go on to
|
||||
Sentry and `Recoverer`, which now writes a 500 only when no status was written
|
||||
- 2026-10-07: the files shared from `sneak/prompts` are its copies at commit
|
||||
`dd4027b` ([#113](https://git.eeqj.de/sneak/netwatch/issues/113)), with this
|
||||
repository's own entries after the shared content in `.gitignore`,
|
||||
|
||||
Reference in New Issue
Block a user