Report each teardown and setup step from what it did, not from whether it was attempted
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user