diff --git a/langchain/callbacks/manager.py b/langchain/callbacks/manager.py index 2069195f..2c935003 100644 --- a/langchain/callbacks/manager.py +++ b/langchain/callbacks/manager.py @@ -238,6 +238,8 @@ async def _ahandle_event_for_handler( else: logger.warning(f"Error in {event_name} callback: {e}") except Exception as e: + if handler.raise_error: + raise e logger.warning(f"Error in {event_name} callback: {e}")