Files
hermes-webui/api
Sebastian B 743b757a77 fix(api): reject malformed and non-object JSON bodies with clean 400s
read_body() silently turned malformed JSON into {} (clients then got a
misleading 'Missing field' 400) and passed non-dict JSON through to handlers
where body.get() raised AttributeError and surfaced as a generic 500.
Raise ValueError instead — handle_post already maps it to a clean 400 — and
give the PATCH/DELETE/PUT dispatchers the same mapping they lacked. Empty
bodies keep the documented {} default.
2026-08-28 00:49:50 +01:00
..