~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

`resolveSubject` without `action` is refused with a dangling message

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

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.