From 5e401dad81fa5381ecc3ffa69381239458825dc1 Mon Sep 17 00:00:00 2001 From: isaac hershenson Date: Wed, 11 Sep 2024 18:46:47 -0700 Subject: [PATCH] bagatur comment --- libs/core/langchain_core/tools/base.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libs/core/langchain_core/tools/base.py b/libs/core/langchain_core/tools/base.py index 78088c77acc..2082b05b2ac 100644 --- a/libs/core/langchain_core/tools/base.py +++ b/libs/core/langchain_core/tools/base.py @@ -681,11 +681,7 @@ class ChildTool(BaseTool): ) status = "error" except ToolException as e: - if not self.handle_tool_error: - error_to_raise = e - else: - content = _handle_tool_error(e, flag=self.handle_tool_error) - status = "error" + raise e except Exception as e: raise ToolException(str(e)) from e except KeyboardInterrupt as e: @@ -808,11 +804,7 @@ class ChildTool(BaseTool): ) status = "error" except ToolException as e: - if not self.handle_tool_error: - error_to_raise = e - else: - content = _handle_tool_error(e, flag=self.handle_tool_error) - status = "error" + raise e except Exception as e: raise ToolException(str(e)) from e except KeyboardInterrupt as e: