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/5xx)
2Validation errorInvalid input, missing required flags, or malformed data
3Authentication errorMissing or expired credentials, insufficient scopes
4Network errorConnection failure, timeout, DNS resolution error
5Internal errorUnexpected CLI error (bug)

Usage in scripts

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