Error Handling and Limits¶
Purpose¶
Provide robust error handling and rate-limit guidance.
Common HTTP status codes¶
400bad request401missing or invalid API key403access forbidden404resource not found429rate limit exceeded5xxserver error
Handling 429 rate limits¶
Use exponential backoff with jitter and reduce concurrency. For high-cost endpoints like Annotator/Recommender, send smaller batches and monitor response time.
Retry/backoff patterns¶
- Retry
429and transient5xxerrors. - Use capped exponential backoff with randomized jitter.
Debugging failed requests¶
- Validate API key and auth method.
- Ensure class IDs are URL-encoded.
- Test URLs with
curland compare response structure.