Optimize error log

This commit is contained in:
yangdx
2025-04-24 15:46:25 +08:00
parent 3aab5b41f2
commit 7f09972901

View File

@@ -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(