Replace RequestError with the HTTP-style error classes

clusterio#999 removed RequestError. Handlers now throw NotFoundError,
ValidationError, ConflictError or UnavailableError, and exp_auto_restart
treats any ClientError from the host as a final refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-28 23:43:25 +00:00
1 parent afc1d35668
commit 389004d652
8 files changed
+32 -32

No files matched your search

+1 -1
View File
@@ -219,7 +219,7 @@ t.test("class AutoRestart", t2 => {
addInstance(controller, 10, 1);
addSystem(controller, 1);
controller.sendTo = async () => { throw new lib.RequestError("Cannot restart"); };
controller.sendTo = async () => { throw new lib.ConflictError("Cannot restart"); };
await plugin.check(now);
await plugin.check(now + 10_000);
t3.strictSame(logs.filter(([level]) => level === "error").length, 1, "a refusal is logged once");