From a6d85c6c2fe1bf3bf4e361d93861e044a7bca056 Mon Sep 17 00:00:00 2001 From: Jin Hai Date: Mon, 26 Aug 2024 13:36:00 +0800 Subject: [PATCH] Provide detailed error information. (#2093) ### What problem does this PR solve? Most 'index failure' error is caused by ES. ### Type of change - [x] Refactoring Signed-off-by: Jin Hai --- rag/svr/task_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/svr/task_executor.py b/rag/svr/task_executor.py index 9f027faa5e9..febfc769986 100644 --- a/rag/svr/task_executor.py +++ b/rag/svr/task_executor.py @@ -357,7 +357,7 @@ def main(): cron_logger.info("Indexing elapsed({}): {:.2f}".format(r["name"], timer() - st)) if es_r: - callback(-1, "Index failure!") + callback(-1, f"Insert chunk error, detail info please check ragflow-logs/api/cron_logger.log. Please also check ES status!") ELASTICSEARCH.deleteByQuery( Q("match", doc_id=r["doc_id"]), idxnm=search.index_name(r["tenant_id"])) cron_logger.error(str(es_r))