Output and exit codes
Output format
Choose with -o table or -o json (--json is short for -o json). The default is a table in an interactive terminal and JSON otherwise, so scripts get JSON without asking.
JSON output is the server's response, unchanged.
Errors
Errors go to standard error:
-
In an interactive terminal with table output: a readable line,
error: <message>. -
Otherwise: the server's JSON error body on one line, for example:
{"error":"logs not enabled on this control plane","code":"not_enabled"}
Exit codes
| Exit code | Meaning |
|---|---|
| 0 | Success |
| 1 | Invalid input or usage |
| 2 | Not authenticated, or token refresh failed |
| 3 | Forbidden or not found |
| 4 | Server or network error (also: a --wait deployment that failed) |