Skip to content

Commit 5ef2d28

Browse files
committed
better condition
1 parent 40f049d commit 5ef2d28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentry_sdk/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,8 @@ def exceptions_from_error(
869869
# This would lead to an infinite loop, so we skip the causing exception
870870
# in this case. (because it is the same as the base_exception above)
871871
if (
872-
isinstance(causing_exception, ExceptionGroup)
872+
BaseExceptionGroup is not None
873+
and isinstance(causing_exception, BaseExceptionGroup)
873874
and len(causing_exception.exceptions) == 1
874875
and causing_exception.exceptions[0] == exc_value
875876
):

0 commit comments

Comments
 (0)