From 4e9a6769b907c9598fc83b5f9c4b46af188a8a72 Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Wed, 10 Mar 2021 14:25:38 +0900 Subject: [PATCH] Fix #629 confusing debug log by ConversationStore --- src/conversation-store.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/conversation-store.ts b/src/conversation-store.ts index 958d845a0..66169b58e 100644 --- a/src/conversation-store.ts +++ b/src/conversation-store.ts @@ -62,9 +62,12 @@ export function conversationContext( context.updateConversation = (conversation: ConversationState) => store.set(conversationId, conversation); try { context.conversation = await store.get(conversationId); - logger.debug(`Conversation context loaded for ID ${conversationId}`); + logger.debug(`Conversation context loaded for ID: ${conversationId}`); } catch (error) { - logger.debug(`Conversation context failed loading for ID: ${conversationId}, error: ${error.message}`); + if (error.messsage !== 'undefined' && error.message !== 'Conversation not found') { + // The conversation data can be expired - error: Conversation expired + logger.debug(`Conversation context failed loading for ID: ${conversationId}, error: ${error.message}`); + } } } else { logger.debug('No conversation ID for incoming event');