Fix duplicated "Suggestion:" prefix in error output#6857
Conversation
The suggestion text in auth/errors.go and project/container_helper.go included a "Suggestion: " prefix, but the UX renderer already prepends one — resulting in "Suggestion: Suggestion: ..." in the output. Remove the redundant prefix from the suggestion values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Removes redundant "Suggestion: " prefixes from ErrorWithSuggestion payloads so the UX renderer (ux.ErrorWithSuggestion.ToString) doesn’t display duplicated "Suggestion: Suggestion: ..." output in the CLI.
Changes:
- Remove
"Suggestion: "from suggestion strings in auth and container error paths. - Update gRPC server/prompt service test fixtures to match the new suggestion text.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
cli/azd/pkg/project/container_helper.go |
Removes redundant "Suggestion: " from a Docker/containerd-related suggestion message. |
cli/azd/pkg/auth/errors.go |
Removes redundant "Suggestion: " from re-login-required suggestion and documents the renderer behavior. |
cli/azd/internal/grpcserver/server_test.go |
Updates test expectations for suggestion text without the prefix. |
cli/azd/internal/grpcserver/prompt_service_test.go |
Updates test fixtures for suggestion text without the prefix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
The suggestion text in
pkg/auth/errors.goandpkg/project/container_helper.goincluded a"Suggestion: "prefix, but the UX renderer (pkg/output/ux/error_with_suggestion.go) already prepends one — resulting in"Suggestion: Suggestion: ..."in the CLI output.This was observed during
azd provisionwith an expired token:Fix
Remove the redundant
"Suggestion: "prefix from the suggestion values in:pkg/auth/errors.gopkg/project/container_helper.goUpdate test expectations in:
internal/grpcserver/server_test.gointernal/grpcserver/prompt_service_test.go