Skip to content

Commit 1f85e01

Browse files
committed
fix(integrations): early redurn when we don't have a span in failure_callback
1 parent 09c5ca7 commit 1f85e01

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sentry_sdk/integrations/litellm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ def _failure_callback(
199199
# type: (...) -> None
200200
"""Handle request failure."""
201201
span = kwargs.get("_sentry_span")
202+
if span is None:
203+
return
202204

203205
try:
204206
# Capture the exception

0 commit comments

Comments
 (0)