handle unsupported connection provider (#20577)

* handle unknown connection provider

* fix error
This commit is contained in:
Alan Ren
2022-09-09 14:14:33 -07:00
committed by GitHub
parent b9cb3de85b
commit be8bf7fcdc
10 changed files with 85 additions and 68 deletions

View File

@@ -141,6 +141,11 @@ export class MainThreadConnectionManagement extends Disposable implements MainTh
}
public async $openConnectionDialog(providers: string[], initialConnectionProfile?: IConnectionProfile, connectionCompletionOptions?: azdata.IConnectionCompletionOptions): Promise<azdata.connection.Connection | undefined> {
if (initialConnectionProfile?.providerName && this._capabilitiesService.providers[initialConnectionProfile.providerName] === undefined) {
await this._connectionManagementService.handleUnsupportedProvider(initialConnectionProfile.providerName);
return undefined;
}
// Here we default to ConnectionType.editor which saves the connecton in the connection store by default
let connectionType = ConnectionType.editor;