A malformed `dry_run` is rejected before auth and outside the error contract
Defect 10 / Tier 2 / suggestion
services/proxy/src/routes/admin.rs:51-56services/proxy/src/routes/admin.rs:61-66Expected review
take the flag as `Option<String>` and parse it in the handler, or attach a rejection handler that renders the same problem document, so this route's failures look like the rest of the service's.
Discovery difficulty
the handler looks complete and `authorise` is its first line, so the ordering only becomes visible once you know extractors run before the body. A reviewer who reports either half - the wrong error shape, or the parameter being reachable before the credential check - has this one.
Trigger
`POST /v1/admin/cache/sweep?dry_run=1` with a valid token answers `400` with `content-type: text/plain` and the body `Failed to deserialize query string: dry_run: provided string was not 'true' or 'false'`. Every other failure in the service is `application/problem+json` carrying a status, a stable code and a request id, which is what `error.rs` exists to guarantee. Verified against the running binary, including that the same request with no token also answers `400` rather than `401`, so the parameter's name and type are readable without a credential.
Severity
suggestion