From 09dc3682d747b57664398bffa4471606a3fb0dbb Mon Sep 17 00:00:00 2001 From: damocles Date: Fri, 26 Jun 2026 00:35:52 +0200 Subject: [PATCH] fix(#1995): send {} body on schedule cancel-all (was empty body 400) --- frontend/packages/dashboard/src/schedules.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/packages/dashboard/src/schedules.js b/frontend/packages/dashboard/src/schedules.js index 410567c0..0b196a0d 100644 --- a/frontend/packages/dashboard/src/schedules.js +++ b/frontend/packages/dashboard/src/schedules.js @@ -1072,8 +1072,11 @@ async function postScheduleCancel(id, targets) { const opts = { method: 'POST', headers: { 'Content-Type': 'application/json' }, + // Always send a valid JSON body — cancel-all is `{}` (an empty body + // with a json content-type would 400 a strict extractor). Per-target + // cancel carries the list. + body: JSON.stringify(targets ? { targets } : {}), }; - if (targets) opts.body = JSON.stringify({ targets }); const resp = await fetch('/api/schedules/' + encodeURIComponent(id) + '/cancel', opts); if (!resp.ok) { const text = await resp.text().catch(() => '');