From 906ff46e6c0d3afa4d19f1c54b9820daa178ede1 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Wed, 18 Jun 2025 16:55:59 -0700 Subject: [PATCH] Handle research iterations where document search returns no results --- src/khoj/routers/research.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/khoj/routers/research.py b/src/khoj/routers/research.py index 8cb415cb..ce4332ba 100644 --- a/src/khoj/routers/research.py +++ b/src/khoj/routers/research.py @@ -347,6 +347,8 @@ async def research( except Exception as e: this_iteration.warning = f"Error extracting document references: {e}" logger.error(this_iteration.warning, exc_info=True) + else: + this_iteration.warning = "No matching document references found" elif this_iteration.tool == ConversationCommand.Online: previous_subqueries = {