Skip to content

Commit

Permalink
Add additional masking
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 committed Aug 27, 2024
1 parent ed5ee89 commit 9b65f33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions azure/src/wizard/VerifyProvidersStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -40,6 +40,7 @@ export class VerifyProvidersStep<T extends ISubscriptionActionContext> 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
Expand All @@ -49,8 +50,8 @@ export class VerifyProvidersStep<T extends ISubscriptionActionContext> 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
}
}));
}
Expand Down

0 comments on commit 9b65f33

Please sign in to comment.