ai: catch TypeError

This commit is contained in:
thedragonsinn
2025-03-20 10:06:26 +05:30
parent 469b4d02ad
commit 523e227680

View File

@@ -75,7 +75,7 @@ def get_response_content(
candidate = response.candidates
parts = candidate[0].content.parts
parts[0]
except (AttributeError, IndexError):
except (AttributeError, IndexError, TypeError):
return "Query failed... Try again", None
try: