Skip to main content

Exit codes

Shoplazza CLI uses structured exit codes to indicate the type of failure.

CodeTypeDescription
0SuccessCommand completed successfully
1API errorThe Shoplazza API returned an error (4xx other than 403, or 5xx)
2Validation errorInvalid input, unknown command or flag, missing required flags, malformed data, or no profile configured yet
3Authentication errorMissing or expired credentials, insufficient scopes (HTTP 403)
4Network errorConnection failure, timeout, DNS resolution error
5Internal errorUnexpected CLI error (bug)
130CanceledYou declined a confirmation or aborted a prompt with Ctrl-C at an interactive terminal; nothing is printed

Usage in scripts​

shell
shoplazza products list
case $? in
0) echo "Success" ;;
1) echo "API error — check response body" ;;
2) echo "Validation error — check your flags" ;;
3) echo "Auth error — run: shoplazza auth login" ;;
4) echo "Network error — check your connection" ;;
5) echo "Internal error — please report a bug" ;;
esac
On this page