Handle JSONDecodeError in is_server_or_retry_error function (#133)

feat: handle JSONDecodeError in is_server_or_retry_error function
This commit is contained in:
Daniel Chalef 2024-09-20 11:16:04 -07:00 committed by GitHub
parent 69964d302a
commit 6d065d363a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,7 +35,7 @@ logger = logging.getLogger(__name__)
def is_server_or_retry_error(exception):
if isinstance(exception, RateLimitError):
if isinstance(exception, (RateLimitError, json.decoder.JSONDecodeError)):
return True
return (