Error Handling
Error Responses#
API errors are returned with appropriate HTTP status codes and error messages in JSON format:
{ "error": "error_message" }
Common Status Codes#
- 200: Success
- 400: Bad Request
- 404: Not Found
- 429: Rate Limit Exceeded
- 500: Internal Server Error
Error Messages#
Common error messages include:
- "invalid function call" (404)
- "server error" (500)
- "Rate limit exceeded" (429)
Best Practices#
- Always check response status codes
- Handle rate limiting appropriately
- Implement proper error handling
- Log error responses for debugging