added new password reset number (#22920)

This commit is contained in:
Alex Ma
2023-05-01 18:28:28 -07:00
committed by GitHub
parent 88c9e0b492
commit 7edd48fb11
2 changed files with 3 additions and 2 deletions

View File

@@ -7,7 +7,8 @@ import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
// Error code reference comes from here: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors?view=sql-server-ver16
export const MssqlPasswordResetErrorCode: number = 18488;
export const MssqlPasswordResetErrorCode: number[] = [18488, 18487];
export const MssqlCertValidationFailedErrorCode: number = -2146893019;
export const MssqlConnectionTelemetryView = 'MssqlConnectionErrorDialog';

View File

@@ -54,7 +54,7 @@ export class ErrorDiagnosticsProvider extends SqlOpsFeature<any> {
let handleConnectionError = async (errorInfo: azdata.diagnostics.IErrorInformation, connection: azdata.connection.ConnectionProfile): Promise<azdata.diagnostics.ConnectionDiagnosticsResult> => {
let restoredProfile = this.convertToIConnectionProfile(connection);
if (errorInfo.errorCode === ErrorDiagnosticsConstants.MssqlPasswordResetErrorCode) {
if (ErrorDiagnosticsConstants.MssqlPasswordResetErrorCode.includes(errorInfo.errorCode)) {
logDebug(`ErrorDiagnosticsProvider: Error Code ${errorInfo.errorCode} requires user to change their password, launching change password dialog.`);
return await this.handleChangePassword(restoredProfile);
}