Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exit Codes

Spall returns structured exit codes so shell scripts and CI pipelines can branch on outcome without parsing stderr.

CodeMeaningWhen It Happens
0Success2xx HTTP response
1Usage errorMissing required argument, unknown API/operation, bad flag, config parse failure
2Network errorDNS failure, TCP timeout, TLS error, proxy failure, stale cache with no fallback
3Spec errorYAML/JSON parse failure, dangling $ref, invalid OpenAPI structure, cache corruption that cannot be rebuilt
4HTTP 4xxClient error responses (400, 401, 403, 404, etc.)
5HTTP 5xxServer error responses (500, 502, 503, etc.)
10Validation failedPreflight parameter or body schema validation failed

Scripting Examples

Retry on network failure

spall petstore get-pet-by-id 1 || [ $? -eq 2 ] && sleep 5 && spall petstore get-pet-by-id 1

Skip downstream steps on 4xx

spall github get-repo rustpunk/spall || {
  code=$?
  if [ "$code" -eq 4 ]; then
    echo "Repo not found, skipping build..."
    exit 0
  fi
  exit "$code"
}

Fail CI on validation errors

spall internal create-order --data @order.json || {
  code=$?
  if [ "$code" -eq 10 ]; then
    echo "Validation failed — check your payload."
  fi
  exit "$code"
}

Next Steps