Skip to content

Commit c74ffa7

Browse files
committed
Enhance error handling in DeepnoteFileChangeWatcher to check save operation result and log warnings for undefined saves
1 parent 8898be9 commit c74ffa7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/notebooks/deepnote/deepnoteFileChangeWatcher.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,12 @@ export class DeepnoteFileChangeWatcher implements IExtensionSyncActivationServic
370370
// mtime from our recent write, so no "content is newer" conflict.
371371
this.markSelfWrite(fileUri);
372372
try {
373-
await workspace.save(notebook.uri);
373+
const saved = await workspace.save(notebook.uri);
374+
if (!saved) {
375+
this.consumeSelfWrite(fileUri);
376+
logger.warn(`[FileChangeWatcher] Save after sync write returned undefined: ${notebook.uri.path}`);
377+
return;
378+
}
374379
} catch (saveError) {
375380
this.consumeSelfWrite(fileUri);
376381
logger.warn(`[FileChangeWatcher] Save after sync write failed: ${notebook.uri.path}`, saveError);

0 commit comments

Comments
 (0)