diff --git a/src/commands/sqlToModel.ts b/src/commands/sqlToModel.ts index 4f8b227b7..d5c0af76c 100644 --- a/src/commands/sqlToModel.ts +++ b/src/commands/sqlToModel.ts @@ -59,6 +59,9 @@ export class SqlToModel { } const event = this.eventMap.get(project.projectRoot.fsPath); if (!event) { + project.throwDiagnosticsErrorIfAvailable(); + // If we get here, we don't know what exactly is the error. + // Probably the extension is still initializing window.showErrorMessage( extendErrorWithSupportLinks( "The extension is still initializing, please retry again.", diff --git a/src/dbt_client/dbtCloudIntegration.ts b/src/dbt_client/dbtCloudIntegration.ts index 6e95b0cb0..3c749eb17 100644 --- a/src/dbt_client/dbtCloudIntegration.ts +++ b/src/dbt_client/dbtCloudIntegration.ts @@ -977,4 +977,8 @@ export class DBTCloudProjectIntegration } async applyDeferConfig(): Promise {} + + throwDiagnosticsErrorIfAvailable(): void { + this.throwBridgeErrorIfAvailable(); + } } diff --git a/src/dbt_client/dbtCoreIntegration.ts b/src/dbt_client/dbtCoreIntegration.ts index 3f7c7a472..e1d544c0e 100644 --- a/src/dbt_client/dbtCoreIntegration.ts +++ b/src/dbt_client/dbtCoreIntegration.ts @@ -1079,4 +1079,8 @@ export class DBTCoreProjectIntegration ); await this.rebuildManifest(); } + + throwDiagnosticsErrorIfAvailable(): void { + this.throwBridgeErrorIfAvailable(); + } } diff --git a/src/dbt_client/dbtIntegration.ts b/src/dbt_client/dbtIntegration.ts index b28f09e15..680081a90 100644 --- a/src/dbt_client/dbtIntegration.ts +++ b/src/dbt_client/dbtIntegration.ts @@ -373,6 +373,7 @@ export interface DBTProjectIntegration extends Disposable { ): Promise; applyDeferConfig(): Promise; getAllDiagnostic(): Diagnostic[]; + throwDiagnosticsErrorIfAvailable(): void; getPythonBridgeStatus(): boolean; } diff --git a/src/manifest/dbtProject.ts b/src/manifest/dbtProject.ts index b9674ac9a..24bb4cbc7 100644 --- a/src/manifest/dbtProject.ts +++ b/src/manifest/dbtProject.ts @@ -1120,4 +1120,8 @@ select * from renamed async applyDeferConfig(): Promise { await this.dbtProjectIntegration.applyDeferConfig(); } + + throwDiagnosticsErrorIfAvailable() { + this.dbtProjectIntegration.throwDiagnosticsErrorIfAvailable(); + } }