mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-22 07:33:12 +09:00
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:
1 parent
afc1d35668
commit
389004d652
8 files changed
+32
-32
No files matched your search
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user