mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
[SQL-Migration] Improve error message for failed migration service download (#22846)
Add troubleshooting links to error message when SQL-Migration fails to download the MigrationService as seen in this issue: #22558 --------- Co-authored-by: Akshay Mata <akma@microsoft.com>
This commit is contained in:
@@ -78,13 +78,23 @@ export class ServiceClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async downloadBinaries(context: vscode.ExtensionContext, rawConfig: Buffer): Promise<string> {
|
public async downloadBinaries(context: vscode.ExtensionContext, rawConfig: Buffer): Promise<string> {
|
||||||
const config = JSON.parse(rawConfig.toString());
|
try {
|
||||||
config.installDirectory = path.join(context.extensionPath, config.installDirectory);
|
const config = JSON.parse(rawConfig.toString());
|
||||||
config.proxy = vscode.workspace.getConfiguration('http').get('proxy');
|
config.installDirectory = path.join(context.extensionPath, config.installDirectory);
|
||||||
config.strictSSL = vscode.workspace.getConfiguration('http').get('proxyStrictSSL', true);
|
config.proxy = vscode.workspace.getConfiguration('http').get('proxy');
|
||||||
const serverdownloader = new ServerProvider(config);
|
config.strictSSL = vscode.workspace.getConfiguration('http').get('proxyStrictSSL', true);
|
||||||
serverdownloader.eventEmitter.onAny(this.generateHandleServerProviderEvent());
|
const serverdownloader = new ServerProvider(config);
|
||||||
return serverdownloader.getOrDownloadServer();
|
serverdownloader.eventEmitter.onAny(this.generateHandleServerProviderEvent());
|
||||||
|
return serverdownloader.getOrDownloadServer();
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
const errorStr = localize('downloadingServiceFailed', "Failed to download binaries for {0}. Use the following link to troubleshoot: {1}", constants.serviceName, "https://aka.ms/dms-migrations-troubleshooting#azure-data-studio-limitations");
|
||||||
|
const errorStrWithLink = localize('downloadingServiceFailedWithLinkMarkup', "Failed to download binaries for {0}. Use this [link to troubleshoot]({1}).", constants.serviceName, "https://aka.ms/dms-migrations-troubleshooting#azure-data-studio-limitations");
|
||||||
|
this.outputChannel.appendLine(errorStr);
|
||||||
|
void vscode.window.showErrorMessage(errorStrWithLink);
|
||||||
|
logError(TelemetryViews.SqlServerDashboard, errorStr, error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private createClientOptions(): ClientOptions {
|
private createClientOptions(): ClientOptions {
|
||||||
|
|||||||
Reference in New Issue
Block a user