Skip to content

Local error messages degrade in JSON mode (hint text, bare local_error, version_unavailable) #608

Description

@sdairs

Discovered during v0.4.2 post-merge stress testing. JSON mode is the primary surface for agents, but several local errors render worse in JSON than human mode:

  1. local server remove <running> — human mode says stop it first with `clickhousectl local server stop dev` ; JSON mode suggests "command": "clickhousectl local server list" (crates/clickhousectl/src/local/output.rs:198-202). Hint should point at stop <name>.
  2. Unmapped local errors collapse to a bare {"code":"local_error","message":"Local command failed"} with no detail. E.g. local server start x --config does-not-exist: human shows config 'does-not-exist' not found ... (available: hereabouts-ai.xml); JSON loses all of it.
  3. local remove <not-installed-version>: human says "Version X not found"; JSON maps it to version_unavailable / "try local list --remote" (src/local/output.rs:213-228), conflating not-installed with unresolvable download.

Expected

JSON errors should carry the same detail and accurate hints as human output.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglocalAffects local CLI commands

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions