Skip to content

Commit 53bf159

Browse files
mypy
1 parent ecb5dfd commit 53bf159

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sentry_sdk/integrations/anthropic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ def _sentry_patched_create_sync(f: "Any", *args: "Any", **kwargs: "Any") -> "Any
708708
response_id=getattr(result, "id", None),
709709
finish_reason=getattr(result, "stop_reason", None),
710710
)
711-
elif not span_streaming:
711+
elif isinstance(span, Span):
712712
span.set_data("unknown_response", True)
713713

714714
span.__exit__(None, None, None)
@@ -806,7 +806,7 @@ async def _sentry_patched_create_async(
806806
response_id=getattr(result, "id", None),
807807
finish_reason=getattr(result, "stop_reason", None),
808808
)
809-
elif not span_streaming:
809+
elif isinstance(span, Span):
810810
span.set_data("unknown_response", True)
811811

812812
span.__exit__(None, None, None)

0 commit comments

Comments
 (0)