oliver-zehentleitner / maity

hub: name the reason of every 401/403/429 in the request log and count them in the stats line

Sign in to report

tsk-j9dca058zqyk Open

Oliver decided on 2026-12-05 (req-9nefnrjmvmcf): unattended anomaly monitoring, step 1.

Why: today a 401 or 429 shows in the request log without its reason, and the per-minute stats line counts no 4xx. An agent-free watcher (CronJob, ops) can only alert on what the log shows.

What: every 401/403/429 log line carries its code (for example signature_invalid, timestamp_skew, nonce_reused, credential_revoked, rate_limited plus the scope). Never a credential or a body. The stats line counts 401/403/429 per code. Keep the key=value format; JSON logs stay rejected (hub/context/serving.md). Update docs/api.md or the serving context where the log format is described, and the changelog.

Done when: a grep on the log gives the rate per reason, with tests.