rough-pizza-5956
08/07/2025, 3:54 AMtall-airline-16756
08/07/2025, 3:54 AMtall-airline-16756
08/07/2025, 3:55 AMAPIStatusError
for status code errors (e.g., 429) and APIConnectionError
for connection issues. These exceptions include properties like status_code
and retryable
.
• Retryable Flag: Check the retryable
flag in exceptions to decide whether to retry the operation.
• Handle Specific Status Codes: Use the status_code
property to handle specific errors like rate limiting (429) or server errors (5xx).
• Retry with Backoff: Implement exponential backoff for retryable errors to avoid overwhelming the server.
• Connection Options: Configure retry intervals and maximum retries using connection options in the API client.
• WebSocket Errors: For WebSocket connections, handle errors during the connection process using specific error types like ConnectionError
.
Let me know if you need detailed examples or further assistance!
Sources: livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/api.py