Found during 0.4.0 RC cloud-command testing (2026-07-30).
Two error-rendering gaps, same theme:
1. Query API errors print as a raw JSON blob
$ chctl cloud service query --id <id> -q "SELECT broken FROM"
Error: {"error":{"code":"62","details":"Syntax error: failed at position 19 (end of query): . Expected one of: table, table function, subquery ..."}}
Other cloud errors are formatted (Error: BAD_REQUEST: Invalid service id <string:not-a-uuid>, Error: NOT_FOUND: <id>), but the query path passes the response body through verbatim. Extract error.code/error.details into the message, e.g. Error: SQL error 62: Syntax error: failed at position 19 ....
2. Wrong --org-id yields a bare Error: NOT_FOUND
$ chctl cloud service list --org-id 00000000-0000-4000-8000-000000000001
Error: NOT_FOUND
(exit 1)
No hint of what wasn't found. Anywhere the API returns NOT_FOUND without a detail string, the CLI knows the resource it asked for and can say organization 00000000-... not found.
Found during 0.4.0 RC cloud-command testing (2026-07-30).
Two error-rendering gaps, same theme:
1. Query API errors print as a raw JSON blob
Other cloud errors are formatted (
Error: BAD_REQUEST: Invalid service id <string:not-a-uuid>,Error: NOT_FOUND: <id>), but the query path passes the response body through verbatim. Extracterror.code/error.detailsinto the message, e.g.Error: SQL error 62: Syntax error: failed at position 19 ....2. Wrong
--org-idyields a bareError: NOT_FOUNDNo hint of what wasn't found. Anywhere the API returns NOT_FOUND without a detail string, the CLI knows the resource it asked for and can say
organization 00000000-... not found.