Skip to content

Feature/improve invalid token error - #6339

Merged
joanlopez merged 4 commits into
masterfrom
feature/improve-invalid-token-error
Aug 28, 2026
Merged

joanlopez merged 4 commits into
masterfrom
feature/improve-invalid-token-error

Conversation

@janHildebrandt98

@janHildebrandt98 janHildebrandt98 commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What?

  • Adds a hint to the error output when a cloud request failed with 401 in the v6 client:
image
  • Adjusted v6 test server with ability to return errors to enable testing.

Tradeoffs

Hint is also visible when cloud login fails (redundant). Accepted for simplicity.
image

Why?

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

Related PR(s)/Issue(s)

Closes #5874

@janHildebrandt98
janHildebrandt98 requested a review from a team as a code owner August 26, 2026 08:43
@janHildebrandt98
janHildebrandt98 requested review from joanlopez and szkiba and removed request for a team August 26, 2026 08:43
@janHildebrandt98
janHildebrandt98 temporarily deployed to azure-trusted-signing August 26, 2026 08:49 — with GitHub Actions Inactive
@janHildebrandt98
janHildebrandt98 temporarily deployed to azure-trusted-signing August 26, 2026 08:50 — with GitHub Actions Inactive
Comment thread internal/cloudapi/v6/v6test/server.go Outdated
Comment on lines +64 to +65
// the endpoint's normal canned response. For testing how the CLI
// handles a failing API call (e.g. an invalid/expired token, a 5xx).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit; I think this comment can be a bit misleading, as only 401 is really supported, and any other status will cause a panic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adjusted the comment

@janHildebrandt98
janHildebrandt98 temporarily deployed to azure-trusted-signing August 26, 2026 10:58 — with GitHub Actions Inactive
@janHildebrandt98
janHildebrandt98 temporarily deployed to azure-trusted-signing August 26, 2026 11:00 — with GitHub Actions Inactive
@janHildebrandt98

Copy link
Copy Markdown
Contributor Author

hint text taken from #6333
thanks to @Swapnil-Biswas

@janHildebrandt98
janHildebrandt98 temporarily deployed to azure-trusted-signing August 26, 2026 11:11 — with GitHub Actions Inactive
@janHildebrandt98
janHildebrandt98 temporarily deployed to azure-trusted-signing August 26, 2026 11:13 — with GitHub Actions Inactive
Comment thread internal/cloudapi/v6/client.go Resolved
@joanlopez
joanlopez merged commit 38c7c45 into master Aug 28, 2026
63 checks passed
@joanlopez
joanlopez deleted the feature/improve-invalid-token-error branch August 28, 2026 15:44
@inancgumus inancgumus added this to the v2.3.0 milestone Sep 10, 2026

This branch was previously deployed

1 inactive deployment
azure-trusted-signing โ€” c6ba91ec Deployed Aug 26, 2026 by janHildebrandt98 via sign-packages #10472
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.

Show actionable guidance on invalid token for cloud commands

4 participants