Skip to content

Commit 065e24e

Browse files
committed
resilience
1 parent bf5ec90 commit 065e24e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sentry_sdk/integrations/anthropic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ def _set_input_data(span, kwargs, integration):
124124
and isinstance(message["content"], (list, tuple))
125125
):
126126
for item in message["content"]:
127-
if item["type"] == "tool_result":
127+
if item.get("type") == "tool_result":
128128
normalized_messages.append(
129129
{
130130
"role": "tool",
131131
"content": {
132-
"tool_use_id": item["tool_use_id"],
133-
"output": item["content"],
132+
"tool_use_id": item.get("tool_use_id"),
133+
"output": item.get("content"),
134134
},
135135
}
136136
)

0 commit comments

Comments
 (0)