Skip to content

Commit 9719a81

Browse files
committed
Fix promise handling in select input settings save failure
Remove promise resolution from the catch block when save fails so the promise stays pending until the user explicitly retries or cancels. Previously, calling resolvePromise(null) made callers think the flow finished even though the panel remained open and interactive. Now when save fails: - The error is logged via logger.error for debugging - The error is already shown to the user via saveSettings - The promise remains pending (not resolved) - The panel stays open so the user can retry or cancel - Only explicit cancel or successful save resolves the promise
1 parent ebd75c9 commit 9719a81

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/notebooks/deepnote/selectInputSettingsWebview.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,10 @@ export class SelectInputSettingsWebviewProvider {
155155
}
156156
this.currentPanel?.dispose();
157157
} catch (error) {
158-
// Error is already shown to user in saveSettings, just reject the promise
159-
if (this.resolvePromise) {
160-
this.resolvePromise(null);
161-
this.resolvePromise = undefined;
162-
}
163-
// Keep panel open so user can retry or cancel
158+
// Error is already shown to user in saveSettings
159+
// Keep promise pending so user can retry or cancel
160+
// Panel remains open for retry
161+
logger.error('SelectInputSettingsWebview: Failed to save settings', error);
164162
}
165163
}
166164
break;

0 commit comments

Comments
 (0)