diff --git a/frontend/sync-client/src/errors/errors.ts b/frontend/sync-client/src/errors/errors.ts new file mode 100644 index 00000000..7dc48a3a --- /dev/null +++ b/frontend/sync-client/src/errors/errors.ts @@ -0,0 +1,34 @@ +export class SyncResetError extends Error { + public constructor() { + super("SyncClient has been reset, cleaning up"); + this.name = "SyncResetError"; + } +} + +export class ServerVersionMismatchError extends Error { + public constructor(message: string) { + super(message); + this.name = "ServerVersionMismatchError"; + } +} + +export class AuthenticationError extends Error { + public constructor(message: string) { + super(message); + this.name = "AuthenticationError"; + } +} + +export class FileNotFoundError extends Error { + public constructor( + message: string, + public readonly filePath: string + ) { + super(message); + this.name = "FileNotFoundError"; + } +} + +export class PermanentSyncError extends Error { } + +export class LocalChangesDuringReconciliation extends Error { } diff --git a/frontend/sync-client/src/file-operations/file-not-found-error.ts b/frontend/sync-client/src/file-operations/file-not-found-error.ts deleted file mode 100644 index b8acd265..00000000 --- a/frontend/sync-client/src/file-operations/file-not-found-error.ts +++ /dev/null @@ -1,9 +0,0 @@ -export class FileNotFoundError extends Error { - public constructor( - message: string, - public readonly filePath: string - ) { - super(message); - this.name = "FileNotFoundError"; - } -} diff --git a/frontend/sync-client/src/services/authentication-error.ts b/frontend/sync-client/src/services/authentication-error.ts deleted file mode 100644 index 6be4af24..00000000 --- a/frontend/sync-client/src/services/authentication-error.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class AuthenticationError extends Error { - public constructor(message: string) { - super(message); - this.name = "AuthenticationError"; - } -} diff --git a/frontend/sync-client/src/services/server-version-mismatch-error.ts b/frontend/sync-client/src/services/server-version-mismatch-error.ts deleted file mode 100644 index 0b9960ea..00000000 --- a/frontend/sync-client/src/services/server-version-mismatch-error.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class ServerVersionMismatchError extends Error { - public constructor(message: string) { - super(message); - this.name = "ServerVersionMismatchError"; - } -} diff --git a/frontend/sync-client/src/services/sync-reset-error.ts b/frontend/sync-client/src/services/sync-reset-error.ts deleted file mode 100644 index 7b74e0b9..00000000 --- a/frontend/sync-client/src/services/sync-reset-error.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class SyncResetError extends Error { - public constructor() { - super("SyncClient has been reset, cleaning up"); - this.name = "SyncResetError"; - } -}