mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 01:25:38 -05:00
fix sql bindings error message not showing (#17276)
* fix error message not showing * use utils.getErrorMessage
This commit is contained in:
@@ -32,7 +32,7 @@ export async function launchAddSqlBindingQuickpick(uri: vscode.Uri | undefined,
|
||||
try {
|
||||
getAzureFunctionsResult = await azureFunctionsService.getAzureFunctions(uri.fsPath);
|
||||
} catch (e) {
|
||||
void vscode.window.showErrorMessage(e);
|
||||
void vscode.window.showErrorMessage(utils.getErrorMessage(e));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ export async function launchAddSqlBindingQuickpick(uri: vscode.Uri | undefined,
|
||||
try {
|
||||
settings = await azureFunctionsUtils.getLocalSettingsJson(path.join(path.dirname(projectUri.fsPath!), constants.azureFunctionLocalSettingsFileName));
|
||||
} catch (e) {
|
||||
void vscode.window.showErrorMessage(e);
|
||||
void vscode.window.showErrorMessage(utils.getErrorMessage(e));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export async function launchAddSqlBindingQuickpick(uri: vscode.Uri | undefined,
|
||||
}
|
||||
} catch (e) {
|
||||
// display error message and show select setting quickpick again
|
||||
void vscode.window.showErrorMessage(e);
|
||||
void vscode.window.showErrorMessage(utils.getErrorMessage(e));
|
||||
}
|
||||
// If user cancels out of this or doesn't want to overwrite an existing setting
|
||||
// just return them to the select setting quickpick in case they changed their mind
|
||||
@@ -201,7 +201,7 @@ export async function launchAddSqlBindingQuickpick(uri: vscode.Uri | undefined,
|
||||
.withAdditionalProperties({ bindingType: selectedBinding.label })
|
||||
.send();
|
||||
} catch (e) {
|
||||
void vscode.window.showErrorMessage(e);
|
||||
void vscode.window.showErrorMessage(utils.getErrorMessage(e));
|
||||
TelemetryReporter.sendErrorEvent(TelemetryViews.SqlBindingsQuickPick, TelemetryActions.finishAddSqlBinding);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user