Skip to content

Commit

Permalink
Merge pull request #827 from seratch/issue-629-remove-confusing-debug…
Browse files Browse the repository at this point in the history
…-logs

Fix #629 confusing debug log by ConversationStore
  • Loading branch information
misscoded authored Mar 10, 2021
2 parents 257dd6d + 4e9a676 commit b8bc037
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 b8bc037

Please sign in to comment.