Exit codes
The CLI uses two exit codes:
Code
Meaning
0
Success.
1
Any error — HTTP failure, bad input, permission denied, network timeout, etc.
Scripts should not branch on specific non-zero codes. Read stderr and the JSON response body for diagnostic detail, or re-run with --verbose to see the exact HTTP exchange.
Scripting
Bash
if celigo flows get "$FLOW_ID" >/dev/null 2>&1; then
echo "flow exists"
else
echo "missing or failed; see error output above"
exit 1
fiPowerShell
celigo flows get $FlowId | Out-Null
if ($LASTEXITCODE -ne 0) {
throw "flow fetch failed (exit $LASTEXITCODE)"
}Debugging non-zero exits
Re-run with
--verbose. The underlying HTTP request and response print to stderr withAuthorizationredacted.Check the API status code and
errors[]body. The Errors & status codes page in the API section covers the full error envelope and common codes.Sanity-check your token —
celigo profile whoami(or any authenticated read) with the same token disambiguates auth problems from request problems.
Last updated
Was this helpful?