Report each teardown and setup step from what it did, not from whether it was attempted

This commit is contained in:
Gmer4Lfe
2026-08-16 21:46:26 -04:00
parent 65516ea3ac
commit 5bdf3bff60
5 changed files with 109 additions and 33 deletions
+7 -1
View File
@@ -182,7 +182,13 @@ function _vvPtRun(id, extraArgs) {
if (!r.ok) throw new Error('HTTP ' + r.status);
return r.text();
}).then(text => {
if (!text.trim()) return {ok: true, _empty_response: true};
// An empty body is never success. api/run.php echoes JSON on every path it can reach, so
// nothing arriving means the request died before it: Unraid's CSRF guard exits with an empty
// body on a token mismatch, nginx returns an empty 200 for a bodyless POST, and a PHP fatal
// produces the same. Returning {ok:true} for that made a killed request and a launched job
// indistinguishable — press Onboard, get no error, and nothing has run. vvApiKey below has
// always thrown on this; the action path is what disagreed.
if (!text.trim()) throw new Error('Empty response — request rejected before it reached run.php');
return JSON.parse(text);
});
}