Skip to content

Commit 2ae0c03

Browse files
committed
Switching to geetattr
1 parent 2b7dca9 commit 2ae0c03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sentry_sdk/integrations/pydantic_ai/spans/execute_tool.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ def execute_tool_span(
3838
span.set_data(SPANDATA.GEN_AI_TOOL_TYPE, tool_type)
3939
span.set_data(SPANDATA.GEN_AI_TOOL_NAME, tool_name)
4040

41-
if tool_definition is not None and tool_definition.description is not None:
41+
if (
42+
tool_definition is not None
43+
and getattr(tool_definition, "description", None) is not None
44+
):
4245
span.set_data(
4346
SPANDATA.GEN_AI_TOOL_DESCRIPTION,
4447
tool_definition.description,

0 commit comments

Comments
 (0)