Repository navigation
fix(cli): report typed JSON error codes for cloud service client binary errors (#1443) - #1447
Merged
sdairs merged 1 commit intoNov 16, 2026
Conversation
…ry errors (#1443) cloud service client runs the local client pre-flight (version resolution, --login support, launchability) under Commands::Cloud, so its JSON errors went through CloudErrorDetail::from_error and collapsed to `other` with no command. Reuse the local classification for those variants so the Cloud envelope reports invalid_version, version_not_installed, version_selection_required, binary_not_launchable and unsupported_client_version with the same repair command as local client.
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.
Why:
cloud service client(#1154) runs local binary resolution,--loginversion checks, and launchability pre-flight underCommands::Cloud, so in--jsonor agent mode its pre-flight failures went throughCloudErrorDetail::from_errorand collapsed to"code": "other"with nocommand.What: Reuse
local::output::installed_client_errorinCloudErrorDetail::from_errorsocloud service clientemitsinvalid_version,version_not_installed,version_selection_required,binary_not_launchable, andunsupported_client_versionwith the same runnable repaircommandaslocal client. Document the codes indocs/reference/automation.md.QA: Unit test in
cloud::outputverifying every mapped variant's JSON envelope and parsing eachcommandstep through clap, plus a subprocess test intests/cloud/query.rs(service_client_too_old_build_reports_a_typed_json_error).Risks: Low; additive
CloudErrorCodevariants replacingotherforcloud service clientlocal binary failures.Closes #1443
Note
Low Risk
Additive JSON error codes and shared classification only; no API or auth changes—
otheris replaced for a specific set of local pre-flight failures oncloud service client.Overview
cloud service clientnow surfaces the same local build pre-flight failure codes in--jsonaslocal client, instead of collapsing them tootherwith no recovery hint.Five new
CloudErrorCodevalues (invalid_version,version_not_installed,version_selection_required,binary_not_launchable,unsupported_client_version) are wired through a sharedinstalled_client_errorhelper inlocal/output.rsandCloudErrorDetail::from_error, each with the same runnablecommandas local mode.Documentation in
automation.mdlists these codes for automation. Coverage includes unit tests for every mapped variant (including clap-validated repair commands) and an integration test that an too-old build fails before any Cloud API call withunsupported_client_version.Reviewed by Cursor Bugbot for commit df1c536. Bugbot is set up for automated code reviews on this repo. Configure here.