From 9b65f332776feb3bf1e80803e91fe033606fe91c Mon Sep 17 00:00:00 2001 From: MicroFish91 <40250218+MicroFish91@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:02:13 -0700 Subject: [PATCH] Add additional masking --- azure/src/wizard/VerifyProvidersStep.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/azure/src/wizard/VerifyProvidersStep.ts b/azure/src/wizard/VerifyProvidersStep.ts index 6a860eca40..1347356105 100644 --- a/azure/src/wizard/VerifyProvidersStep.ts +++ b/azure/src/wizard/VerifyProvidersStep.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import type { Provider, ResourceManagementClient } from '@azure/arm-resources'; -import { AzureWizardExecuteStep, IParsedError, ISubscriptionActionContext, parseError } from '@microsoft/vscode-azext-utils'; +import { AzureWizardExecuteStep, IParsedError, ISubscriptionActionContext, maskUserInfo, parseError } from '@microsoft/vscode-azext-utils'; import { l10n, Progress } from 'vscode'; import * as types from '../../index'; import { createResourcesClient } from '../clients'; @@ -40,6 +40,7 @@ export class VerifyProvidersStep extends A } catch (error) { // ignore and continue with wizard. An error here would likely be confusing and un-actionable const perror: IParsedError = parseError(error); + const maskedErrorMessage: string = maskUserInfo(perror.message, []); /** * @param providerError @@ -49,8 +50,8 @@ export class VerifyProvidersStep extends A * @param providerErrorV2 * A duplicate replacement of the `providerError` telemetry property. */ - context.telemetry.properties.providerError = perror.message; - context.telemetry.properties.providerErrorV2 = perror.message; + context.telemetry.properties.providerError = maskedErrorMessage + context.telemetry.properties.providerErrorV2 = maskedErrorMessage } })); }