Exit codes
Shoplazza CLI uses structured exit codes to indicate the type of failure.
| Code | Type | Description |
|---|---|---|
0 | Success | Command completed successfully |
1 | API error | The Shoplazza API returned an error (4xx/5xx) |
2 | Validation error | Invalid input, missing required flags, or malformed data |
3 | Authentication error | Missing or expired credentials, insufficient scopes |
4 | Network error | Connection failure, timeout, DNS resolution error |
5 | Internal error | Unexpected 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