From 7209e09230a887af9c8bc6670bfaee35258cdd33 Mon Sep 17 00:00:00 2001 From: Garrett Spong Date: Fri, 17 May 2024 13:05:40 -0600 Subject: [PATCH] Update kb entry naming on naming data client get --- .../knowledge_base/get_knowledge_base_entry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/get_knowledge_base_entry.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/get_knowledge_base_entry.ts index ee39a69e50d03..15bd7bfb910ba 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/get_knowledge_base_entry.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/get_knowledge_base_entry.ts @@ -71,10 +71,10 @@ export const getKnowledgeBaseEntry = async ({ index: knowledgeBaseIndex, seq_no_primary_term: true, }); - const conversation = transformESSearchToKnowledgeBaseEntry(response); - return conversation[0] ?? null; + const knowledgeBaseEntry = transformESSearchToKnowledgeBaseEntry(response); + return knowledgeBaseEntry[0] ?? null; } catch (err) { - logger.error(`Error fetching conversation: ${err} with id: ${id}`); + logger.error(`Error fetching knowledge base entry: ${err} with id: ${id}`); throw err; } };