Skip to content

Commit 62cdec2

Browse files
vhvb1989Copilot
andcommitted
fix: add sentinel errors to excludedErrors in Test_PackageLevelErrorsMapped
The 4 subscription filter sentinel errors (ErrInteractiveRequired, ErrNoSubscriptionsFound, ErrNoTenantsFound, ErrNoFilterExists) are user-facing errors caught in sub-filter command actions and never propagate to the telemetry MapError path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5834929 commit 62cdec2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cli/azd/internal/cmd/errors_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,12 @@ func Test_PackageLevelErrorsMapped(t *testing.T) {
12511251
"ErrNoResourcesFound": "pkg/prompt: interactive prompt error, caught in command callers",
12521252
"ErrNoResourceSelected": "pkg/prompt: interactive prompt error, caught in command callers",
12531253

1254+
// Subscription filter errors surfaced as user-facing messages in sub-filter commands
1255+
"ErrInteractiveRequired": "internal: sub-filter requires interactive mode, caught in command action",
1256+
"ErrNoSubscriptionsFound": "internal: no subscriptions available, caught in command action",
1257+
"ErrNoTenantsFound": "internal: no tenants available, caught in command action",
1258+
"ErrNoFilterExists": "internal: no filter to remove, caught in command action",
1259+
12541260
// Template errors caught in init flow
12551261
"ErrTemplateNotFound": "pkg/templates: caught in init/template callers before reaching telemetry",
12561262

0 commit comments

Comments
 (0)