mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Remove command link from deployment error (#12573)
This commit is contained in:
@@ -189,8 +189,12 @@ export async function promptAndConfirmPassword(validate: (input: string) => stri
|
||||
/**
|
||||
* Gets the message to display for a given error object that may be a variety of types.
|
||||
* @param error The error object
|
||||
* @param useMessageWithLink Whether to use the messageWithLink - if available
|
||||
*/
|
||||
export function getErrorMessage(error: any): string {
|
||||
export function getErrorMessage(error: any, useMessageWithLink: boolean = false): string {
|
||||
if (useMessageWithLink && error.messageWithLink) {
|
||||
return error.messageWithLink;
|
||||
}
|
||||
return error.message ?? error;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ export function instanceDeletionWarning(name: string): string { return localize(
|
||||
export function invalidInstanceDeletionName(name: string): string { return localize('arc.invalidInstanceDeletionName', "The value '{0}' does not match the instance name. Try again or press escape to exit", name); }
|
||||
export function couldNotFindAzureResource(name: string): string { return localize('arc.couldNotFindAzureResource', "Could not find Azure resource for {0}", name); }
|
||||
export function passwordResetFailed(error: any): string { return localize('arc.passwordResetFailed', "Failed to reset password. {0}", getErrorMessage(error)); }
|
||||
export function errorConnectingToController(error: any): string { return localize('arc.errorConnectingToController', "Error connecting to controller. {0}", getErrorMessage(error)); }
|
||||
export function errorConnectingToController(error: any): string { return localize('arc.errorConnectingToController', "Error connecting to controller. {0}", getErrorMessage(error, true)); }
|
||||
export function passwordAcquisitionFailed(error: any): string { return localize('arc.passwordAcquisitionFailed', "Failed to acquire password. {0}", getErrorMessage(error)); }
|
||||
export const invalidPassword = localize('arc.invalidPassword', "The password did not work, try again.");
|
||||
export function errorVerifyingPassword(error: any): string { return localize('arc.errorVerifyingPassword', "Error encountered while verifying password. {0}", getErrorMessage(error)); }
|
||||
|
||||
Reference in New Issue
Block a user