body["action"].as_str().unwrap_or_default() makes a missing (or non-string) action the empty string, which falls into the catch-all and is refused InvalidRequest "action is resolve, escalate or note, not " — ending in nothing, rather than saying action is required.
How to see it
Read against docs/fresh at 4636e6d, the code at: crates/group-host/src/moderation.rs:419-428. Paths are under crates/group-host/src unless they say otherwise. Severity: low.
What you expected
ok_or_else(|| invalid("action is required")) before the match, as group and subject are read.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
body["action"].as_str().unwrap_or_default()makes a missing (or non-string)actionthe empty string, which falls into the catch-all and is refusedInvalidRequest"action is resolve, escalate or note, not " — ending in nothing, rather than sayingactionis required.How to see it
Read against
docs/freshat 4636e6d, the code at: crates/group-host/src/moderation.rs:419-428. Paths are undercrates/group-host/srcunless they say otherwise. Severity: low.What you expected
ok_or_else(|| invalid("action is required"))before the match, asgroupandsubjectare read.Where
The host, as built from 4636e6d. Found while checking the docs against the code.