Skip to content

Commit 5087bc4

Browse files
committed
fix(anthropic) import error for older versions of anthropic
1 parent 29f6ba2 commit 5087bc4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sentry_sdk/integrations/anthropic.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
)
1717

1818
try:
19-
from anthropic import NOT_GIVEN
19+
try:
20+
from anthropic import NOT_GIVEN
21+
except ImportError:
22+
NOT_GIVEN = None
23+
2024
from anthropic.resources import AsyncMessages, Messages
2125

2226
if TYPE_CHECKING:

0 commit comments

Comments
 (0)