Give every JSON answer @meta, errors included (closes #201) #208

Merged
clawbot merged 1 commits from issue-201-meta-everywhere into next 2026-10-27 21:20:08 +01:00
1 Commits
Author SHA1 Message Date
sneak edc222f1bb Give every JSON answer @meta, errors included (closes #201)
check / check (push) Waiting to run
A panic in a JSON route's handler answered 500 with an empty body,
because the router's recoverer sits outside the middleware that adds
`@meta`. `JSONValidationMiddleware` now wraps the handler in the same
recoverer, and answers the panic with the JSON error body.

`/status.json` and the health check answered chi's empty 405 to any
method they do not take. They now answer with the same JSON 405 as the
routes under `/api/v1` and `/ip`.

The home page's IP lookup card showed only the answer's `data`. It now
shows the whole answer, `@meta` included.

A table test checks `@meta` on every JSON route, in its successes and
its errors.

Model: opus-5-5
2026-10-27 20:08:59 +00:00