[AZINTS-4595] Remove Error Traceback from UserActionRequiredError and UserRetriableError messages - #170
Draft
mshvartsberg wants to merge 3 commits into
Draft
Conversation
… user-facing error text Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mshvartsberg
force-pushed
the
meggan.shvartsberg/azints-4595/remove-pii-from-errors
branch
from
April 23, 2026 18:54
1228b84 to
52f486a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When an Azure quickstart script encounters an error, it reports status updates to Datadog. Some error classes (subclasses of
UserActionRequiredErrorandUserRetriableError) were appending raw Azure CLI output to their messages viaformat_error_details(), which may contain PII that should not be sent to Datadog.Changes
az_shared/errors.py: Removed allformat_error_details(error_message)calls fromUserActionRequiredErrorsubclasses so only the static, user-facinguser_action_messageis included. FixedAzCliNotAuthenticatedErrorto use a static message instead of passingerror_messageas the user action. Removed the now-unusedformat_error_detailshelper.script_status.py: Changed theUserRetriableErrorhandler inreport_step()to reporte.user_action_messageinstead oftraceback.format_exc(), matching the pattern already used forUserActionRequiredError.test_script_status.py: Updatedtest_user_actionable_errorandtest_user_retriable_errorto reflect the new messages (no raw error details appended).Testing
test_script_status.pycover the updated behavior.