Skip to content

Commit

Permalink
Fix #629 confusing debug log by ConversationStore
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Mar 10, 2021
1 parent 257dd6d commit 4e9a676
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/conversation-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ export function conversationContext<ConversationState = any>(
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');
Expand Down

0 comments on commit 4e9a676

Please sign in to comment.