Errors and exit codes
Use the process exit code to detect failure. With --json, read the error document from stdout to decide how to recover.
Exit codes
| Code | Meaning |
|---|---|
0 | The command succeeded. |
1 | An operation failed. This includes API, authentication, entitlement, network, and internal errors. |
2 | The CLI needs different input or confirmation. This includes a destructive command that requires --yes in a non-interactive run. |
130 | The process was interrupted by SIGINT, usually from Ctrl+C. |
143 | The process received SIGTERM. |
Terminal errors
The CLI writes a short error headline to stderr. It starts with an error marker such as ✗ in color output and Error: in plain output. When available, it adds labeled details such as the API code, affected parameter, retry delay, request ID, or docs URL. A suggested next step describes when to use the command and shows the command on the following line.
orc jobs get --no-colorCalling jobs get without a job ID exits with code 2.
Error: Missing path argument: id
See command usage:
orc jobs get --helpJSON errors
With --json, stdout contains one error document with success: false. The human-readable diagnostic is also written to stderr. Use error.reason for recovery decisions and keep error.message for display.
{
"success": false,
"error": {
"message": "Missing path argument: id",
"code": 2,
"category": "validation",
"reason": "missing_input",
"hint": "Run `orc jobs get --help` for usage.",
"next": [{ "command": "orc jobs get --help", "when": "See command usage" }],
"user_action_required": false
}
}The CLI includes details, context, and the API metadata fields when available. If user_action_required is true, pause for the user. Check the conditions in next before using a suggested command.
| Field | Meaning |
|---|---|
success | false for an error response. |
error.code | Numeric process exit code. |
error.category | Broad CLI error class, such as auth or validation. |
error.message | Human-readable message. |
error.reason | Machine-readable reason. See the list below. |
error.hint | Recovery hint or null. |
error.next | Suggested steps as an array of objects with command and when. The array can be empty. |
error.user_action_required | Whether a person needs to act before the workflow continues. |
error.details | Optional API details or validation issues with path, message, and code. |
error.context | Optional context such as the HTTP status. |
error.api_code | API error code, when supplied. |
error.type | API error type, when supplied. |
error.param | Input parameter involved in the failure, when supplied. |
error.request_id | API request ID for troubleshooting, when supplied. |
error.retryable | Whether the API marks the failure as retryable, when supplied. |
error.retry_after_seconds | Wait time in seconds before retrying, when supplied. |
error.doc_url | API error documentation URL, when supplied. |
error.upgrade_url | Upgrade URL, when supplied. |
error.feature | Feature associated with the error, when supplied. |
Error reasons
| Reason | Meaning or action |
|---|---|
login_required | Sign in or supply a credential. |
invalid_token | Replace or renew the credential. |
forbidden | Check permissions and Workspace selection. |
not_found | Check the resource ID and Workspace. |
validation_failed | Correct the invalid input. |
missing_input | Supply the required input. |
unknown_command | Find the command with orc --help. |
unknown_option | Check the command's --help for supported options. |
conflict | Check the current resource state before retrying. |
payload_too_large | Reduce the size of the input. |
rate_limited | Wait for the rate limit to reset before retrying a safe request. |
insufficient_credits | Check the Workspace credit balance. |
entitlement_required | Check the Workspace plan or entitlement grant. |
server_error | Check the API status and request ID. |
service_unavailable | Wait for the service to recover. |
network_error | Check connectivity before retrying. |
timeout | Check the resource or job state if a request may have reached the server. |
canceled | The command or operation was canceled. |
unknown_outcome | Check the operation state before submitting it again. |
internal_error | Report the CLI error with the command and request ID if available. |
For HTTP response codes and API error codes, see API errors.