Skip to content
hscli

Exit codes

hscli returns deterministic, sysexits-style exit codes. Scripts and agents can branch on the result without parsing output.

CodeMeaning
0Success
1Usage / generic error
65Validation error (HTTP 422)
69Help Scout API unavailable (5xx)
70Unexpected internal error
75Rate limited — retry with backoff
77Not authenticated or forbidden (401 / 403)
78Configuration error
handle the common cases
hscli conv list --status active --output json
case $? in
0) echo "ok" ;;
77) echo "re-authenticate: hscli auth login" ; exit 77 ;;
75) echo "rate limited — backing off" ; sleep 30 ;;
69) echo "Help Scout unavailable — retry later" ; exit 69 ;;
*) echo "unexpected error" ; exit 1 ;;
esac