Repository navigation
feat(cli): name the next command in scope, credential, and login errors - #24
Open
thebrandonlucas wants to merge 1 commit into
Open
thebrandonlucas wants to merge 1 commit into
thebrandonlucas wants to merge 1 commit into
Conversation
thebrandonlucas
added this pull request to stack #25
October 13, 2026 18:56
This was referenced Oct 13, 2026
thebrandonlucas
force-pushed
the
feat/cli-error-hints
branch
from
October 19, 2026 13:14
59c4f38 to
b8f54fd
Compare
thebrandonlucas
force-pushed
the
feat/cli-error-hints
branch
2 times, most recently
from
October 19, 2026 13:47
c77c34d to
3e49448
Compare
thebrandonlucas
force-pushed
the
feat/cli-error-hints
branch
from
October 19, 2026 18:25
3e49448 to
6fd4bcb
Compare
thebrandonlucas
force-pushed
the
feat/cli-error-hints
branch
4 times, most recently
from
October 19, 2026 19:19
0d3964a to
ed7d51a
Compare
This was referenced Oct 19, 2026
Errors for a missing --org, --env, --wallet, or webhook ID now name the command that lists those IDs and every way to supply one. An unknown or ambiguous credential or profile lists the saved names. An expired or revoked login (OAuth invalid_grant) says so and gives the exact voltage logout --local and voltage login commands that replace it. organizations list and environments list with an API key say which key was used and how to select a browser login. API rejections carry a next step: HTTP 401 points to voltage auth status, HTTP 403 points to voltage context, and quote_required points to voltage quotes create and notes that a wallet on a BTC line of credit needs no quote. Hints can now be built at runtime and are scrubbed like messages, since they can name saved credentials. A rejection's message leads with the API's own reason, such as "Quote is required for payment", instead of only the HTTP status. Human output shows the rest of the API error as indented field/value lines rather than a JSON line; --json still reports the complete response. The payments guide shows the quote-then-receive flow a USD wallet needs.
thebrandonlucas
force-pushed
the
feat/cli-error-hints
branch
from
October 20, 2026 00:20
ed7d51a to
b793cee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack: master ← #20 ← #22 ← this PR ← #19. Depends on #22 (pickers), which handles a missing scope interactively; this PR improves the errors that noninteractive runs still see.
Errors now name the next command, not only the problem:
--org,--env,--wallet, or webhook IDVOLTAGE_*variable, profile)invalid_grant)voltage login --account NAMEorganizations list/environments listwith an API keyvoltage auth status, or sign in againvoltage context, to check the organization, environment, and credentialCredential hints are attached in
CredentialProblem::error, sovoltage contextand commands share one selection path. Hints can now be built at runtime and are scrubbed like messages, because they can name saved credentials and profiles.docs/reference/exit-codes.mdlists them.The
--yesrefusal hint from the original plan is dropped: #14 replaced confirmation prompts with--execute, and the not-executed error already names--executeandVOLTAGE_EXECUTE=1.Validation:
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo machete --with-metadata,cargo test --locked(93 unit, 67 integration), andpython3 scripts/check-coverage.py. New integration tests cover the 401/403 hints, a revoked login, saved credential and profile names, and discovery with an ambient API key.