pub(super) async fn handle_work_cancel(
__arg0: State<AppState>,
__arg1: Path<String>,
body: Option<Json<CancelRequest>>,
) -> (StatusCode, Json<Value>)Expand description
The body is OPTIONAL (reagent P1 on PR #2902). The sibling DELETE route in
the same router — DELETE /agentmux/cron/:id — takes no body at all, so a
caller following that adjacent, established convention would otherwise get
a 400/415 from axum’s Json extractor rather than the intended
“cancel with an empty reason”. CancelRequest::reason is already
#[serde(default)]; making the whole body optional is what actually lets
that default be reached.