diff --git a/src/sql/workbench/parts/notebook/models/notebookModel.ts b/src/sql/workbench/parts/notebook/models/notebookModel.ts index d616168fda..b46c621767 100644 --- a/src/sql/workbench/parts/notebook/models/notebookModel.ts +++ b/src/sql/workbench/parts/notebook/models/notebookModel.ts @@ -777,7 +777,7 @@ export class NotebookModel extends Disposable implements INotebookModel { } await this.shutdownActiveSession(); } catch (err) { - this.notifyError(localize('shutdownError', "An error occurred when closing the notebook: {0}", err)); + this.notifyError(localize('shutdownError', "An error occurred when closing the notebook: {0}", notebookUtils.getErrorMessage(err))); } } @@ -787,7 +787,7 @@ export class NotebookModel extends Disposable implements INotebookModel { await this._activeClientSession.ready; } catch (err) { - this.notifyError(localize('shutdownClientSessionError', "A client session error occurred when closing the notebook: {0}", err)); + this.notifyError(localize('shutdownClientSessionError', "A client session error occurred when closing the notebook: {0}", notebookUtils.getErrorMessage(err))); } await this._activeClientSession.shutdown(); this.clearClientSessionListeners();