mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 07:24:53 +09:00
Use the new error classes in code added on master
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54e9340e61
commit
1a03e66479
4 files changed
+16
-16
No files matched your search
@@ -172,7 +172,7 @@ describe("player_sync controller", function() {
|
||||
});
|
||||
});
|
||||
|
||||
const acquiredError = new lib.RequestError(
|
||||
const acquiredError = new lib.ConflictError(
|
||||
"stored is currently acquired by Running, have the player leave or release the lock first"
|
||||
);
|
||||
|
||||
@@ -323,7 +323,7 @@ describe("player_sync controller", function() {
|
||||
assert.equal((await saved()).get("stored").generation, 4);
|
||||
});
|
||||
it("should reject unknown players", async function() {
|
||||
await assert.rejects(del("unknown"), new lib.RequestError("No player data stored for unknown"));
|
||||
await assert.rejects(del("unknown"), new lib.NotFoundError("No player data stored for unknown"));
|
||||
});
|
||||
it("should reject when the player is acquired", async function() {
|
||||
await assert.rejects(del("stored"), acquiredError);
|
||||
@@ -371,7 +371,7 @@ describe("player_sync controller", function() {
|
||||
});
|
||||
it("should reject players that are not acquired", async function() {
|
||||
await assert.rejects(
|
||||
release("unknown"), new lib.RequestError("unknown is not acquired by any instance"),
|
||||
release("unknown"), new lib.ConflictError("unknown is not acquired by any instance"),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user