Simplify syncing logic
This commit is contained in:
parent
e8c57b3a37
commit
4493365076
48 changed files with 1054 additions and 918 deletions
6
frontend/sync-client/src/errors/authentication-error.ts
Normal file
6
frontend/sync-client/src/errors/authentication-error.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export class AuthenticationError extends Error {
|
||||
public constructor(message: string) {
|
||||
super(message);
|
||||
this.name = "AuthenticationError";
|
||||
}
|
||||
}
|
||||
9
frontend/sync-client/src/errors/file-not-found-error.ts
Normal file
9
frontend/sync-client/src/errors/file-not-found-error.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export class FileNotFoundError extends Error {
|
||||
public constructor(
|
||||
message: string,
|
||||
public readonly filePath: string
|
||||
) {
|
||||
super(message);
|
||||
this.name = "FileNotFoundError";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
export class ServerVersionMismatchError extends Error {
|
||||
public constructor(message: string) {
|
||||
super(message);
|
||||
this.name = "ServerVersionMismatchError";
|
||||
}
|
||||
}
|
||||
6
frontend/sync-client/src/errors/sync-reset-error.ts
Normal file
6
frontend/sync-client/src/errors/sync-reset-error.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export class SyncResetError extends Error {
|
||||
public constructor() {
|
||||
super("SyncClient has been reset, cleaning up");
|
||||
this.name = "SyncResetError";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue