diff --git a/frontend/sync-client/src/services/connection-status.ts b/frontend/sync-client/src/services/connection-status.ts index 5a804cf..39e945b 100644 --- a/frontend/sync-client/src/services/connection-status.ts +++ b/frontend/sync-client/src/services/connection-status.ts @@ -1,7 +1,7 @@ import type { Settings } from "../persistence/settings"; import type { Logger } from "../tracing/logger"; import { createPromise } from "../utils/create-promise"; -import { sleep } from "../utils/sleep"; +import { SyncResetError } from "./sync-reset-error"; export class ConnectionStatus { private static readonly UNTIL_RESOLUTION = Symbol(); @@ -40,7 +40,7 @@ export class ConnectionStatus { } public reset(): void { - this.rejectUntil(new Error("Sync was reset")); + this.rejectUntil(new SyncResetError()); [this.until, this.resolveUntil, this.rejectUntil] = createPromise(); } diff --git a/frontend/sync-client/src/services/sync-reset-error.ts b/frontend/sync-client/src/services/sync-reset-error.ts new file mode 100644 index 0000000..d1aa2eb --- /dev/null +++ b/frontend/sync-client/src/services/sync-reset-error.ts @@ -0,0 +1,6 @@ +export class SyncResetError extends Error { + constructor() { + super("Sync was reset"); + this.name = "SyncResetError"; + } +}