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

+2 -2
View File
@@ -102,7 +102,7 @@ t.test("instance plugin", t2 => {
t2.test("exp_reports:create prints a refusal to the reporter", async t3 => {
const { state, createIPC } = await startPlugin(t3);
state.failNext = new lib.RequestError("dave has already reported bob");
state.failNext = new lib.ConflictError("dave has already reported bob");
await createIPC({ player_name: "bob", by_player_name: "dave", reason: "griefing" });
const { receiver, payload } = decodeRcon(state.rcons[0]);
@@ -113,7 +113,7 @@ t.test("instance plugin", t2 => {
t2.test("text that closes a long bracket stays inside the json", async t3 => {
const { state, createIPC } = await startPlugin(t3);
const message = "]=]) game.print(1) --[==[ ]==] ]===]";
state.failNext = new lib.RequestError(message);
state.failNext = new lib.ConflictError(message);
await createIPC({ player_name: "bob", by_player_name: "dave", reason: message });
const { payload } = decodeRcon(state.rcons[0]);