Error Codes

HTTP Status Codes

Code Meaning Action
200 Success
400 Bad Request Check request parameters
401 Unauthorized Check API key
403 Forbidden Insufficient permissions or plan
404 Not Found Check endpoint URL
429 Rate Limited Wait and retry (see Retry-After header)
500 Server Error Retry with backoff; contact support if persistent
503 Service Unavailable Temporary overload; retry in 30s

Error Response Format

{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit of 60 requests/min exceeded. Retry after 12s.",
    "retry_after": 12,
    "request_id": "req_abc123"
  }
}

Common Error Codes

Code Description
invalid_api_key API key is missing, malformed, or revoked
rate_limit_exceeded Too many requests; respect Retry-After
quota_exceeded Monthly quota reached; upgrade plan
invalid_parameters Missing or invalid request parameters
product_not_found Product URL could not be resolved
generation_failed AI generation failed; retry or simplify input
batch_too_large Batch exceeds max size (100K products)
insufficient_funds On-chain wallet balance too low
chain_unavailable Specified blockchain network is down
tee_attestation_failed TEE verification failed; contact support

SDK Error Handling

from aizel_commerce import AizelCommerce, AizelError, RateLimitError

client = AizelCommerce()

try:
    result = client.product.analyze(title="...")
except RateLimitError as e:
    print(f"Rate limited. Retry in {e.retry_after}s")
except AizelError as e:
    print(f"Error {e.code}: {e.message}")
    print(f"Request ID: {e.request_id}")  # For support tickets

results matching ""

    No results matching ""