From 0103122244c7c1080d3af29c84ae138b99cf3fa3 Mon Sep 17 00:00:00 2001 From: Nikita Zelenskis Date: Wed, 8 Jan 2025 16:28:25 +0100 Subject: [PATCH] raise if no handler found --- libs/langgraph/langgraph/pregel/retry.py | 2 ++ 1 file changed, 2 insertions(+) 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"