Remove duplicate errors

This commit is contained in:
Andras Schmelczer 2026-03-28 12:07:57 +00:00
parent 1c6cd80b64
commit f3d985cc57
5 changed files with 2 additions and 29 deletions

View file

@ -1,9 +0,0 @@
export class FileNotFoundError extends Error {
public constructor(
message: string,
public readonly filePath: string
) {
super(message);
this.name = "FileNotFoundError";
}
}

View file

@ -1,6 +0,0 @@
export class AuthenticationError extends Error {
public constructor(message: string) {
super(message);
this.name = "AuthenticationError";
}
}

View file

@ -1,6 +0,0 @@
export class ServerVersionMismatchError extends Error {
public constructor(message: string) {
super(message);
this.name = "ServerVersionMismatchError";
}
}

View file

@ -1,6 +0,0 @@
export class SyncResetError extends Error {
public constructor() {
super("SyncClient has been reset, cleaning up");
this.name = "SyncResetError";
}
}

View file

@ -142,7 +142,7 @@ export class CursorTracker {
const record = this.database.getLatestDocumentByRelativePath(
doc.relative_path
);
if (record?.metadata?.hash !== hash(readContent)) {
if (record?.metadata?.hash !== (await hash(readContent))) {
doc.vault_update_id = null;
}
}
@ -255,7 +255,7 @@ export class CursorTracker {
return this.database.getLatestDocumentByRelativePath(
document.relative_path
)?.metadata?.hash === hash(currentContent)
)?.metadata?.hash === (await hash(currentContent))
? DocumentUpToDateness.UpToDate
: DocumentUpToDateness.Prior;
}