From 97cc8d6d34f76caad1c3469a4d38b77a3ffe73bb Mon Sep 17 00:00:00 2001 From: qingminlong Date: Tue, 25 Aug 2026 03:48:27 +0800 Subject: [PATCH] docs: correct directory JSON failure envelope (#124989) * docs: correct directory JSON failure envelope * docs(cli): document canonical config and directory JSON failures Preserve the contributor directory error-envelope correction and update config get to distinguish schema-valid unset paths from unknown paths while linking the shared canonical CLI JSON failure contract. Co-authored-by: qingminlong --------- Co-authored-by: Peter Steinberger --- docs/cli/config.md | 4 +++- docs/cli/directory.md | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/cli/config.md b/docs/cli/config.md index f4925ca76f04..358408e63b0a 100644 --- a/docs/cli/config.md +++ b/docs/cli/config.md @@ -60,7 +60,9 @@ openclaw config set 'agents.entries.work.tools.exec.node' "node-id-or-name" Reads a value from the redacted config snapshot (secrets never print). `--json` prints the same redacted value as JSON; otherwise strings/numbers/booleans print bare and objects/arrays print as formatted JSON. -When the path is missing, `--json` writes `{ "error": "Config path not found: " }` to stdout and exits with status 1. Without `--json`, the diagnostic remains on stderr. +A schema-valid but unset path explains that the runtime default applies; an unknown path suggests +`openclaw config schema`. With `--json`, both use the standard [CLI JSON failure envelope](/cli#json-failures) +on stdout and exit with status 1. Without `--json`, diagnostics remain on stderr. ```bash openclaw config get browser.executablePath diff --git a/docs/cli/directory.md b/docs/cli/directory.md index 8370bf4663ea..5f073d21677c 100644 --- a/docs/cli/directory.md +++ b/docs/cli/directory.md @@ -19,8 +19,9 @@ Results are meant to be pasted into other commands, especially `openclaw message - `--json`: output JSON Default output renders IDs and names in a table. Empty list results name the channel and account -that were queried; JSON list output uses an empty array (`[]`). Failures exit nonzero and use an -`{ "error": "..." }` object in JSON mode. +that were queried; JSON list output uses an empty array (`[]`). Failures exit nonzero and use the +canonical `{ "ok": false, "error": { "type": "cli_error", "message": "..." } }` envelope in +JSON mode. ## Notes