Skip to content

Ensure errors don't cause silent failure, make authN failure messages friendlier#89

Open
jeri-temporal wants to merge 4 commits into
mainfrom
jeri/friendly_errors
Open

Ensure errors don't cause silent failure, make authN failure messages friendlier#89
jeri-temporal wants to merge 4 commits into
mainfrom
jeri/friendly_errors

Conversation

@jeri-temporal

Copy link
Copy Markdown
Contributor

What was changed

  • Moved CommandHarnes from integration-only commands_test.go to common_test.go so it could be used for unit tests as well
  • Ensure failures are printed to stderr when error logging is disabled. This prevents the cloud CLI from failing silently
  • Introduce the FriendlyError type as a means of marking error messages for direct display without appending the full error chain
  • Use a custom interceptor to capture errors from within the gRPC call chain and wrap them around errors stored on the context struct. This allows errors.Is/errors.As to find FriendlyErrors that occur inside gRPC callback methods

Why?

Running commands while not logged in (including temporal cloud whoami) produces no output and a non-zero exit code, and other errors are similarly swallowed unless handled specifically within each command.

Checklist

  1. Closes CLDDX-141

  2. How was this tested:
    make, make test, make test-integration, verified that running commands like temporal cloud whoami or temporal cloud namespace list without being authenticated prints no login session found, please run `temporal cloud login`

  3. Any docs updates needed?
    No

@jeri-temporal jeri-temporal requested a review from a team as a code owner July 1, 2026 20:15
@jeri-temporal jeri-temporal reopened this Jul 6, 2026
@jeri-temporal jeri-temporal force-pushed the jeri/friendly_errors branch from 4dd7046 to dde51ca Compare July 6, 2026 18:03
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