None
1 parent ec53096 commit efd9e7fCopy full SHA for efd9e7f
1 file changed
sentry_sdk/integrations/google_genai/utils.py
@@ -608,7 +608,7 @@ def extract_tool_calls(
608
609
# Extract from candidates, sometimes tool calls are nested under the content.parts object
610
candidates = getattr(response, "candidates", [])
611
- if response is not None:
+ if candidates and response is not None:
612
for candidate in candidates:
613
if not hasattr(candidate, "content") or not getattr(
614
candidate.content, "parts", []
0 commit comments