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 index 63af7dab..8725e81e 100644 --- a/frontend/sync-client/src/file-operations/file-not-found-error.ts +++ b/frontend/sync-client/src/file-operations/file-not-found-error.ts @@ -1,5 +1,8 @@ export class FileNotFoundError extends Error { - public constructor(message: string) { + public constructor( + message: string, + public readonly filePath: string + ) { super(message); this.name = "FileNotFoundError"; } diff --git a/frontend/sync-client/src/file-operations/safe-filesystem-operations.ts b/frontend/sync-client/src/file-operations/safe-filesystem-operations.ts index 10d8bae6..30d47f77 100644 --- a/frontend/sync-client/src/file-operations/safe-filesystem-operations.ts +++ b/frontend/sync-client/src/file-operations/safe-filesystem-operations.ts @@ -117,7 +117,8 @@ export class SafeFileSystemOperations implements FileSystemOperations { ): Promise { if (!(await this.fs.exists(path))) { throw new FileNotFoundError( - `File '${path}' not found before trying to ${operationName}` + `File not found before trying to ${operationName}`, + path ); } @@ -131,7 +132,8 @@ export class SafeFileSystemOperations implements FileSystemOperations { throw error; } else { throw new FileNotFoundError( - `File '${path}' not found when trying to ${operationName}` + `File not found when trying to ${operationName}`, + path ); } }