diff --git a/webapp/packages/core/src/app/TopNavBar/ConnectionSchemaManager/ConnectionSchemaManagerService.ts b/webapp/packages/core/src/app/TopNavBar/ConnectionSchemaManager/ConnectionSchemaManagerService.ts index 3d9306f3aa..572d3afdda 100644 --- a/webapp/packages/core/src/app/TopNavBar/ConnectionSchemaManager/ConnectionSchemaManagerService.ts +++ b/webapp/packages/core/src/app/TopNavBar/ConnectionSchemaManager/ConnectionSchemaManagerService.ts @@ -141,7 +141,7 @@ export class ConnectionSchemaManagerService { if (!this.activeItem?.changeConnectionId) { return; } - this.activeItem.changeConnectionId(connectionId, this.activeItem); + this.activeItem.changeConnectionId(connectionId, this.activeItem.context); this.loadConnection(connectionId); } @@ -152,7 +152,7 @@ export class ConnectionSchemaManagerService { if (!this.activeItem?.changeCatalogId) { throw new Error('The try to change catalog without connection'); } - this.activeItem.changeCatalogId(catalogId, this.activeItem); + this.activeItem.changeCatalogId(catalogId, this.activeItem.context); this.loadConnection(this.currentConnectionId!, catalogId); } @@ -163,7 +163,7 @@ export class ConnectionSchemaManagerService { if (!this.activeItem?.changeSchemaId) { throw new Error('The try to change schema without connection'); } - this.activeItem.changeSchemaId(schemaId, this.activeItem); + this.activeItem.changeSchemaId(schemaId, this.activeItem.context); } private onNodeSelect([navNodeId, selected]: [string, boolean]) { diff --git a/webapp/packages/sql-editor/src/SqlEditorTabService.ts b/webapp/packages/sql-editor/src/SqlEditorTabService.ts index 5078915cd8..e1cd502d0e 100644 --- a/webapp/packages/sql-editor/src/SqlEditorTabService.ts +++ b/webapp/packages/sql-editor/src/SqlEditorTabService.ts @@ -114,18 +114,22 @@ export class SqlEditorTabService { await this.sqlDialectInfoService.loadSqlDialectInfo(connectionId); return true; } catch (exception) { - this.notificationService.logError({ title: 'Failed to change SQL-editor connection' }); + this.notificationService.logException(exception, 'Failed to change SQL-editor connection'); return false; } } private async setObjectCatalogId(containerId: string, tab: ITab) { try { - await this.updateSqlContext(tab.handlerState.connectionId, tab.handlerState.contextId, containerId); + await this.updateSqlContext( + tab.handlerState.connectionId, + tab.handlerState.contextId, + containerId + ); tab.handlerState.objectCatalogId = containerId; return true; } catch (exception) { - this.notificationService.logError({ title: 'Failed to change SQL-editor schema' }); + this.notificationService.logException(exception, 'Failed to change SQL-editor catalog'); return false; } } @@ -141,7 +145,7 @@ export class SqlEditorTabService { tab.handlerState.objectSchemaId = containerId; return true; } catch (exception) { - this.notificationService.logError({ title: 'Failed to change SQL-editor schema' }); + this.notificationService.logException(exception, 'Failed to change SQL-editor schema'); return false; } } @@ -158,8 +162,8 @@ export class SqlEditorTabService { } try { await this.gql.gql.sqlContextDestroy({ connectionId, contextId }); - } catch (e) { - this.notificationService.logError({ title: `Failed to destroy SQL-context ${contextId}` }); + } catch (exception) { + this.notificationService.logException(exception, `Failed to destroy SQL-context ${contextId}`); } }