Skip to content

Commit b53751e

Browse files
Update sentry_sdk/integrations/openai_agents/spans/execute_tool.py
Co-authored-by: Ivana Kellyer <[email protected]>
1 parent c32f26a commit b53751e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/openai_agents/spans/execute_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def update_execute_tool_span(span, agent, tool, result):
3939
# type: (sentry_sdk.tracing.Span, agents.Agent, agents.Tool, Any) -> None
4040
_set_agent_data(span, agent)
4141

42-
if type(result) == str and result.startswith(
42+
if isinstance(result, str) and result.startswith(
4343
"An error occurred while running the tool"
4444
):
4545
span.set_status(SPANSTATUS.INTERNAL_ERROR)

0 commit comments

Comments
 (0)