From 6e8f435ed2afec9beb7c821d14f854336589f6c1 Mon Sep 17 00:00:00 2001 From: mohammadrezapourreza Date: Wed, 3 Apr 2024 12:03:54 -0400 Subject: [PATCH] DH5682/fixing the wrong exception handling with tools --- dataherald/sql_generator/dataherald_sqlagent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dataherald/sql_generator/dataherald_sqlagent.py b/dataherald/sql_generator/dataherald_sqlagent.py index 7d634138..857cdd08 100644 --- a/dataherald/sql_generator/dataherald_sqlagent.py +++ b/dataherald/sql_generator/dataherald_sqlagent.py @@ -90,6 +90,8 @@ def wrapper(*args: Any, **kwargs: Any) -> Any: # noqa: PLR0911 return f"Google API returned an error: {e}" except SQLAlchemyError as e: return f"Error: {e}" + except Exception as e: + return f"Error: {e}" return wrapper