Remove any casts in auth extensions (#270089)

This commit is contained in:
Tyler James Leonhardt
2025-10-06 12:28:27 -07:00
committed by GitHub
parent 59308a8b5e
commit 8845fc4b5c
2 changed files with 3 additions and 5 deletions

View File

@@ -86,7 +86,7 @@ export class MicrosoftAuthenticationTelemetryReporter implements IExperimentatio
this._telemetryReporter.sendTelemetryEvent('logoutFailed');
}
sendTelemetryErrorEvent(error: unknown): void {
sendTelemetryErrorEvent(error: Error | string): void {
let errorMessage: string | undefined;
let errorName: string | undefined;
let errorCode: string | undefined;
@@ -94,8 +94,7 @@ export class MicrosoftAuthenticationTelemetryReporter implements IExperimentatio
if (typeof error === 'string') {
errorMessage = error;
} else {
// eslint-disable-next-line local/code-no-any-casts
const authError: AuthError = error as any;
const authError: AuthError = error as AuthError;
// don't set error message or stack because it contains PII
errorCode = authError.errorCode;
errorCorrelationId = authError.correlationId;