Skip to main content

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 codeMeaning
0Success
1Invalid input or usage
2Not authenticated, or token refresh failed
3Forbidden or not found
4Server or network error (also: a --wait deployment that failed)