Troubleshooting

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

CodeMeaning
0The command succeeded.
1An operation failed. This includes API, authentication, entitlement, network, and internal errors.
2The CLI needs different input or confirmation. This includes a destructive command that requires --yes in a non-interactive run.
130The process was interrupted by SIGINT, usually from Ctrl+C.
143The 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.

terminal
orc jobs get --no-color

Calling jobs get without a job ID exits with code 2.

terminal
Error: Missing path argument: id

See command usage:
    orc jobs get --help

JSON 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.

FieldMeaning
successfalse for an error response.
error.codeNumeric process exit code.
error.categoryBroad CLI error class, such as auth or validation.
error.messageHuman-readable message.
error.reasonMachine-readable reason. See the list below.
error.hintRecovery hint or null.
error.nextSuggested steps as an array of objects with command and when. The array can be empty.
error.user_action_requiredWhether a person needs to act before the workflow continues.
error.detailsOptional API details or validation issues with path, message, and code.
error.contextOptional context such as the HTTP status.
error.api_codeAPI error code, when supplied.
error.typeAPI error type, when supplied.
error.paramInput parameter involved in the failure, when supplied.
error.request_idAPI request ID for troubleshooting, when supplied.
error.retryableWhether the API marks the failure as retryable, when supplied.
error.retry_after_secondsWait time in seconds before retrying, when supplied.
error.doc_urlAPI error documentation URL, when supplied.
error.upgrade_urlUpgrade URL, when supplied.
error.featureFeature associated with the error, when supplied.

Error reasons

ReasonMeaning or action
login_requiredSign in or supply a credential.
invalid_tokenReplace or renew the credential.
forbiddenCheck permissions and Workspace selection.
not_foundCheck the resource ID and Workspace.
validation_failedCorrect the invalid input.
missing_inputSupply the required input.
unknown_commandFind the command with orc --help.
unknown_optionCheck the command's --help for supported options.
conflictCheck the current resource state before retrying.
payload_too_largeReduce the size of the input.
rate_limitedWait for the rate limit to reset before retrying a safe request.
insufficient_creditsCheck the Workspace credit balance.
entitlement_requiredCheck the Workspace plan or entitlement grant.
server_errorCheck the API status and request ID.
service_unavailableWait for the service to recover.
network_errorCheck connectivity before retrying.
timeoutCheck the resource or job state if a request may have reached the server.
canceledThe command or operation was canceled.
unknown_outcomeCheck the operation state before submitting it again.
internal_errorReport the CLI error with the command and request ID if available.

For HTTP response codes and API error codes, see API errors.