Skip to content

Commit

Permalink
raise if no handler found
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaZelenskis committed Jan 8, 2025
1 parent 5edd223 commit 0103122
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/langgraph/langgraph/pregel/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0103122

Please sign in to comment.