mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
added new password reset number (#22920)
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user