File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
sentry_sdk/integrations/google_genai Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -383,14 +383,16 @@ def _extract_tool_message_from_part(part: "Any") -> "Optional[dict[str, Any]]":
383383 if isinstance (function_response , dict ):
384384 tool_call_id = function_response .get ("id" )
385385 tool_name = function_response .get ("name" )
386- response_dict = function_response .get ("response" ) or {}
386+ response_dict = function_response .get ("response" , {})
387387 # Prefer "output" key if present, otherwise use entire response
388388 output = response_dict .get ("output" , response_dict )
389389 else :
390390 # FunctionResponse object
391391 tool_call_id = getattr (function_response , "id" , None )
392392 tool_name = getattr (function_response , "name" , None )
393- response_obj = getattr (function_response , "response" , None ) or {}
393+ response_obj = getattr (function_response , "response" , None )
394+ if response_obj is None :
395+ response_obj = {}
394396 if isinstance (response_obj , dict ):
395397 output = response_obj .get ("output" , response_obj )
396398 else :
You can’t perform that action at this time.
0 commit comments