From 18d4f56bf68471eb526eeafcfe0fb6494f264d67 Mon Sep 17 00:00:00 2001 From: Shweta <35878561+shwetamurali@users.noreply.github.com> Date: Fri, 10 Jul 2026 13:52:40 -0400 Subject: [PATCH 1/2] reword --- internal/pkg/cmd/command_internal.go | 6 +++--- internal/pkg/cmd/command_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/pkg/cmd/command_internal.go b/internal/pkg/cmd/command_internal.go index 9ca1264..ad4c783 100644 --- a/internal/pkg/cmd/command_internal.go +++ b/internal/pkg/cmd/command_internal.go @@ -165,10 +165,10 @@ func (c *Command) Run(args []string, inv *Invocation) int { func notFoundErrorHelp(io iostreams.IOStreams, hostname string) string { return heredoc.New(io, heredoc.WithPreserveNewlines(), heredoc.WithWidth(0)).Mustf(` - Resource not found on {{ Bold "%s" }} or you are unauthorized to this action. Check your account permissions. + Resource or path not found on {{ Bold "%s" }}. Verify the API path and any resource IDs are correct. - {{ Bold "$ %s auth status" }} - `, hostname, version.Name) + If the path is correct, your token may not have permission to access this resource. + `, hostname) } // authErrorHelp returns a help message for recovering from authentication errors. diff --git a/internal/pkg/cmd/command_test.go b/internal/pkg/cmd/command_test.go index 5c101ff..f800314 100644 --- a/internal/pkg/cmd/command_test.go +++ b/internal/pkg/cmd/command_test.go @@ -137,7 +137,7 @@ func TestCommand_GlobalExitCode(t *testing.T) { }{ {err: ErrDisplayHelp, expected: cli.RunResultHelp}, {err: ErrDisplayUsage, expected: 1}, - {err: tfe.ErrNotFound, expected: 2, errContains: "Resource not found on app.test.terraform.io or you are unauthorized to this action"}, + {err: tfe.ErrNotFound, expected: 2, errContains: "Resource or path not found on app.test.terraform.io. Verify the API path and any resource IDs are correct."}, {err: tfe.ErrUnauthorized, expected: 3, errContains: "tfctl auth login"}, {err: opErr, expected: 4, errContains: "network error"}, {err: tfe.ErrInternalServer, expected: 5, errContains: "Internal Server Error"}, From 8082f9c20986be2efd3f2e5c60a68c7aea1adeeb Mon Sep 17 00:00:00 2001 From: Shweta <35878561+shwetamurali@users.noreply.github.com> Date: Fri, 10 Jul 2026 13:54:36 -0400 Subject: [PATCH 2/2] Create BUG FIXES-20260710-135409.yaml --- .changes/unreleased/BUG FIXES-20260710-135409.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changes/unreleased/BUG FIXES-20260710-135409.yaml diff --git a/.changes/unreleased/BUG FIXES-20260710-135409.yaml b/.changes/unreleased/BUG FIXES-20260710-135409.yaml new file mode 100644 index 0000000..d107053 --- /dev/null +++ b/.changes/unreleased/BUG FIXES-20260710-135409.yaml @@ -0,0 +1,3 @@ +kind: BUG FIXES +body: Clarify the not-found (404) API error message to point at verifying the request path and resource IDs instead of suggesting an authentication problem. +time: 2026-07-10T13:54:09.690093-04:00