Skip to content

Commit 3be7bd1

Browse files
committed
add check for failed block update
1 parent 0f40641 commit 3be7bd1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/notebooks/deepnote/sqlCellStatusBarProvider.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ export class SqlCellStatusBarProvider implements NotebookCellStatusBarItemProvid
222222

223223
edit.set(cell.notebook.uri, [NotebookEdit.updateCellMetadata(cell.index, updatedMetadata)]);
224224

225-
await workspace.applyEdit(edit);
225+
const success = await workspace.applyEdit(edit);
226+
if (!success) {
227+
void window.showErrorMessage(l10n.t('Failed to update variable name'));
228+
return;
229+
}
226230

227231
// Trigger status bar update
228232
this._onDidChangeCellStatusBarItems.fire();
@@ -313,7 +317,11 @@ export class SqlCellStatusBarProvider implements NotebookCellStatusBarItemProvid
313317

314318
edit.set(cell.notebook.uri, [NotebookEdit.updateCellMetadata(cell.index, updatedMetadata)]);
315319

316-
await workspace.applyEdit(edit);
320+
const success = await workspace.applyEdit(edit);
321+
if (!success) {
322+
void window.showErrorMessage(l10n.t('Failed to select integration'));
323+
return;
324+
}
317325

318326
// Trigger status bar update
319327
this._onDidChangeCellStatusBarItems.fire();

0 commit comments

Comments
 (0)