Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

dev: Explicit error in logs if AI Search index not found

Clémence Lesnée5fab9c56b10
diff --git a/persistence/ai_search.py b/persistence/ai_search.py
index b351685..e76e0fa 100644
--- a/persistence/ai_search.py
+++ b/persistence/ai_search.py
@@ -1,6 +1,7 @@
from azure.core.credentials import AzureKeyCredential
from azure.core.exceptions import (
HttpResponseError,
+ ResourceNotFoundError,
ServiceRequestError,
ServiceResponseError,
)
@@ -133,6 +134,8 @@ class AiSearchSearch(ISearch):
)
except ValidationError as e:
logger.debug(f"Parsing error: {e.errors()}")
+ except ResourceNotFoundError as e:
+ logger.warning(f'AI Search index "{self._config.index}" not found')
except HttpResponseError as e:
logger.error(f"Error requesting AI Search: {e}")
except ServiceRequestError as e: