Skip to content

Commit 3d3ce5b

Browse files
committed
fix(ai): content items may not be dicts
1 parent a623e13 commit 3d3ce5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/ai/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def redact_blob_message_parts(
189189
content = message.get("content")
190190
if isinstance(content, list):
191191
for item in content:
192-
if item.get("type") == "blob":
192+
if isinstance(item, dict) and item.get("type") == "blob":
193193
item["content"] = SENSITIVE_DATA_SUBSTITUTE
194194
return messages
195195

0 commit comments

Comments
 (0)