mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -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> {
|
||||
const config = JSON.parse(rawConfig.toString());
|
||||
config.installDirectory = path.join(context.extensionPath, config.installDirectory);
|
||||
config.proxy = vscode.workspace.getConfiguration('http').get('proxy');
|
||||
config.strictSSL = vscode.workspace.getConfiguration('http').get('proxyStrictSSL', true);
|
||||
const serverdownloader = new ServerProvider(config);
|
||||
serverdownloader.eventEmitter.onAny(this.generateHandleServerProviderEvent());
|
||||
return serverdownloader.getOrDownloadServer();
|
||||
try {
|
||||
const config = JSON.parse(rawConfig.toString());
|
||||
config.installDirectory = path.join(context.extensionPath, config.installDirectory);
|
||||
config.proxy = vscode.workspace.getConfiguration('http').get('proxy');
|
||||
config.strictSSL = vscode.workspace.getConfiguration('http').get('proxyStrictSSL', true);
|
||||
const serverdownloader = new ServerProvider(config);
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user