Skip to main content

Exit codes

Every kobana run ends with one of these codes, so a script or agent can decide what to do without parsing the message.

CodeMeaning
0Success
1API error (4xx/5xx) or network error
2Missing token, or a command and options the CLI does not recognize
3Invalid input (--params or --json that is not JSON, identifier with forbidden characters)
4Unknown kobana schema path
5Internal error

An error also comes out as JSON on stdout. For an API error, error.code is the HTTP status and error.details carries the API response, with its error envelope (details.error.code, such as INSUFFICIENT_SCOPE):

{
"error": {
"code": 403,
"message": "…",
"details": {
"error": { "code": "INSUFFICIENT_SCOPE", "message": "…", "details": { "required": ["write", "all"] } }
}
}
}

Next steps​

  • Usage — syntax, resources, examples.
  • Global flags — --dry-run, --output-format and the rest.