diff --git a/frontend/sync-client/src/utils/locks.test.ts b/frontend/sync-client/src/utils/locks.test.ts index f545e957..33d99da9 100644 --- a/frontend/sync-client/src/utils/locks.test.ts +++ b/frontend/sync-client/src/utils/locks.test.ts @@ -35,7 +35,7 @@ describe("Document lock", () => { test("should throw an error when unlocking a document that is not locked", () => { expect(() => { locks.unlock(testPath); - }).toThrow(`Document ${testPath} is not locked, cannot unlock`); + }).toThrow(`Key '${testPath}' is not locked, cannot unlock`); }); test("should wait for a document lock and resolve when unlocked", async () => { diff --git a/frontend/sync-client/src/utils/locks.ts b/frontend/sync-client/src/utils/locks.ts index 8e52cba0..77b3b767 100644 --- a/frontend/sync-client/src/utils/locks.ts +++ b/frontend/sync-client/src/utils/locks.ts @@ -67,7 +67,7 @@ export class Locks { */ public unlock(key: T): void { if (!this.locked.has(key)) { - throw new Error(`Key ${key} is not locked, cannot unlock`); + throw new Error(`Key '${key}' is not locked, cannot unlock`); } // Remove first waiter to ensure FIFO order