Skip to content

Commit dc4056a

Browse files
.
1 parent 3d61930 commit dc4056a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

sentry_sdk/integrations/anthropic.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
get_start_span_function,
1515
transform_anthropic_content_part,
1616
)
17-
from sentry_sdk.consts import OP, SPANDATA, SPANSTATUS
17+
from sentry_sdk.consts import OP, SPANDATA
1818
from sentry_sdk.integrations import _check_minimum_version, DidNotEnable, Integration
1919
from sentry_sdk.scope import should_send_default_pii
2020
from sentry_sdk.tracing_utils import set_span_errored
@@ -874,13 +874,7 @@ async def _sentry_wrapped_create_async(*args: "Any", **kwargs: "Any") -> "Any":
874874
integration = sentry_sdk.get_client().get_integration(AnthropicIntegration)
875875
kwargs["integration"] = integration
876876

877-
try:
878-
return await _sentry_patched_create_async(f, *args, **kwargs)
879-
finally:
880-
span = sentry_sdk.get_current_span()
881-
if span is not None and span.status == SPANSTATUS.INTERNAL_ERROR:
882-
with capture_internal_exceptions():
883-
span.__exit__(None, None, None)
877+
return await _sentry_patched_create_async(f, *args, **kwargs)
884878

885879
return _sentry_wrapped_create_async
886880

0 commit comments

Comments
 (0)