Error Handling

Q: What to do when encountering a 401 error?

A: 401 indicates authentication failure, please check:

  1. Whether the API key is correct

  2. Header format: Authorization: Bearer your-api-key

  3. Whether the key has expired or been deactivated

Q: What to do when encountering a 429 error?

A: 429 indicates too frequent requests, solutions:

  1. Reduce request frequency

  2. Implement retry mechanism (exponential backoff recommended)

  3. Contact technical support if you need higher rate limits

Q: What to do when encountering a 500 error?

A: 500 indicates server error, please:

  1. Retry later

  2. Check if request parameters are correct

  3. If it persists, contact technical support and provide request details

Q: How to implement request retry?

A: Recommended retry strategy: