feat: emit stable json errors
This commit is contained in:
parent
1f22139070
commit
675e3fb45d
4 changed files with 108 additions and 4 deletions
|
|
@ -36,6 +36,12 @@ explicit migration expectation before scripts depend on them.
|
|||
top-level response variant name and existing field names keep their meaning
|
||||
within a major release.
|
||||
|
||||
Execution failures in `--json` or `--jsonl` mode return a stable JSON error
|
||||
object on stdout with `type: "error"`, a machine-readable `code`, a human
|
||||
`message`, full `detail`, and an optional `hint` derived from operator
|
||||
recovery output. Common codes include `daemon_unavailable`, `unauthorized`,
|
||||
`peer_not_found`, `resource_not_found`, `invalid_input`, and `command_failed`.
|
||||
|
||||
Backward-compatible JSON changes include:
|
||||
|
||||
- Adding nullable or optional fields.
|
||||
|
|
|
|||
Loading…
Reference in a new issue