diff --git a/libs/langgraph/langgraph/pregel/retry.py b/libs/langgraph/langgraph/pregel/retry.py index 7b6a9651b..57010f2ac 100644 --- a/libs/langgraph/langgraph/pregel/retry.py +++ b/libs/langgraph/langgraph/pregel/retry.py @@ -174,6 +174,8 @@ async def arun_with_retry( exception_handler = retry_policy.retry_on.get(type(exc), False) if callable(exception_handler): exception_handler(task.input, exc) + else: + raise else: raise TypeError( "retry_on must be an Exception class, a list or tuple of Exception classes, or a callable"