Reference
| Code | Meaning | When you see it |
|---|---|---|
0 | Success | The command completed and printed its result. |
1 | General error | Unexpected failure. Network error or transient API issue. |
2 | Usage error | Bad arguments, unknown option, missing required value. |
3 | Authentication error | No credentials, invalid or expired token, organization access revoked. |
4 | Not found | The targeted resource (person, event, channel, company, tag) doesn’t exist. |
5 | Forbidden | Authenticated, but the active organization isn’t allowed to act on the resource. |
Read the exit code
Branch in a shell script
set -e halts on the first non-zero exit. The case block maps each domain code to a human-readable message and re-exits with 1 so the calling script can detect the failure.
Combine with the JSON error envelope
When--json is set (or output is piped), errors land on stderr as:
CI pipelines
Most CI runners (GitHub Actions, GitLab CI, CircleCI) fail a step on any non-zero exit code, so the CLI integrates without extra plumbing:auth login was skipped because TALKVALUE_TOKEN is missing, the command exits 3 and the CI step fails with the auth error printed to stderr.
Related
- Output format. Error envelope shape on stderr.
- Authentication. What causes a
3and how to fix it. - Troubleshooting. Common failure modes by exit code.
