Skip to content

[AZINTS-4595] Remove Error Traceback from UserActionRequiredError and UserRetriableError messages - #170

Draft
mshvartsberg wants to merge 3 commits into
mainfrom
meggan.shvartsberg/azints-4595/remove-pii-from-errors
Draft

[AZINTS-4595] Remove Error Traceback from UserActionRequiredError and UserRetriableError messages#170
mshvartsberg wants to merge 3 commits into
mainfrom
meggan.shvartsberg/azints-4595/remove-pii-from-errors

Conversation

@mshvartsberg

@mshvartsberg mshvartsberg commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Motivation

When an Azure quickstart script encounters an error, it reports status updates to Datadog. Some error classes (subclasses of UserActionRequiredError and UserRetriableError) were appending raw Azure CLI output to their messages via format_error_details(), which may contain PII that should not be sent to Datadog.

Changes

  • az_shared/errors.py: Removed all format_error_details(error_message) calls from UserActionRequiredError subclasses so only the static, user-facing user_action_message is included. Fixed AzCliNotAuthenticatedError to use a static message instead of passing error_message as the user action. Removed the now-unused format_error_details helper.
  • script_status.py: Changed the UserRetriableError handler in report_step() to report e.user_action_message instead of traceback.format_exc(), matching the pattern already used for UserActionRequiredError.
  • test_script_status.py: Updated test_user_actionable_error and test_user_retriable_error to reflect the new messages (no raw error details appended).

Testing

  • Unit tests in test_script_status.py cover the updated behavior.
  • Full verification that no PII reaches Datadog will be confirmed once the error logging pipeline (AZINTS-4597, AZINTS-4596) is deployed and logs are visible on the dashboard.
  • Both end to end flows for configure log forwarding and app registration still work.

@mshvartsberg mshvartsberg changed the title Remove PII from error messages sent to Datadog [AZINTS-4595] Remove PII from error messages sent to Datadog Apr 23, 2026
@mshvartsberg
mshvartsberg force-pushed the meggan.shvartsberg/azints-4595/remove-pii-from-errors branch from 1228b84 to 52f486a Compare April 23, 2026 18:54
@mshvartsberg mshvartsberg changed the title [AZINTS-4595] Remove PII from error messages sent to Datadog [AZINTS-4595] Remove Error Traceback from UserActionRequiredError and UserRetriableError messages Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant