wallapop-cli

Exit codes

What each exit status means, and which ones are worth retrying.

Every command exits with a code you can branch on. Nothing prints an error to stdout, so a script can read stdout and check $? independently.

CodeMeaningRetry?
0Success, including "nothing changed"-
1Generic failureMaybe
2Usage: bad flags, unknown filter key, missing locationNo, fix the command
3Auth: no session, session rejected, MFA pendingNo, log in again
4Not found: item, user, conversation or watchNo
5Blocked or rate limited (CloudFront 403, HTTP 429)Yes, after a wait
6Network or timeoutYes
7API changed: a known endpoint returned an unexpected shapeNo, report it
130Interrupted-

Using them

if ! wallapop auth refresh; then
  echo "session expired" >&2
  exit 1
fi

Back off on the retryable codes and stop on the rest:

wallapop watch check --all
case $? in
  0) ;;
  5|6) sleep 300; wallapop watch check --all ;;
  *)  exit 1 ;;
esac

Pair with the error envelope

--error-format json prints a stable category string next to the code. Branch on that when you log failures. See Output.

On this page