Skip to content

Commit 4eb1a0b

Browse files
committed
Try fixing the failing tests
1 parent 5f1db51 commit 4eb1a0b

File tree

1 file changed

+3
-1
lines changed
  • pydantic_graph/pydantic_graph/beta

1 file changed

+3
-1
lines changed

pydantic_graph/pydantic_graph/beta/graph.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,5 +898,7 @@ def _unwrap_exception_groups():
898898
yield
899899
except ExceptionGroup as e:
900900
exception = e.exceptions[0]
901-
exception.__cause__ = None # prevent recursion errors when formatting the exception for logfire
901+
if exception.__cause__ is None:
902+
# bizarrely, this prevents recursion errors when formatting the exception for logfire
903+
exception.__cause__ = None
902904
raise exception

0 commit comments

Comments
 (0)