diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index 584d14b4..e6507c37 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -1114,9 +1114,11 @@ class LightRAG: llm_response_cache=self.llm_response_cache, ) except Exception as e: - logger.error( - f"Failed to extract entities and relationships : {traceback.format_exc()}" - ) + error_msg = f"Failed to extract entities and relationships: {str(e)}" + logger.error(error_msg) + async with pipeline_status_lock: + pipeline_status["latest_message"] = error_msg + pipeline_status["history_messages"].append(error_msg) raise e async def _insert_done(