From 97699f30874a74e4391efd1ede71ec2e504faaac Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 8 Oct 2024 10:59:42 +0530 Subject: [PATCH] chore: log errors --- app/javascript/widget/components/template/EmailInput.vue | 2 +- .../widget/components/template/IntegrationCard.vue | 2 +- app/javascript/widget/store/modules/contacts.js | 8 ++++---- .../widget/store/modules/conversation/actions.js | 2 +- .../widget/store/modules/conversationAttributes.js | 2 +- app/javascript/widget/store/modules/conversationLabels.js | 4 ++-- app/javascript/widget/store/modules/events.js | 2 +- app/javascript/widget/store/modules/message.js | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/javascript/widget/components/template/EmailInput.vue b/app/javascript/widget/components/template/EmailInput.vue index bf8f52b85..96d00984a 100644 --- a/app/javascript/widget/components/template/EmailInput.vue +++ b/app/javascript/widget/components/template/EmailInput.vue @@ -75,7 +75,7 @@ export default { messageId: this.messageId, }); } catch (error) { - // Ignore error + console.log(error); } finally { this.isUpdating = false; } diff --git a/app/javascript/widget/components/template/IntegrationCard.vue b/app/javascript/widget/components/template/IntegrationCard.vue index 9a6cdb784..a2026cd99 100644 --- a/app/javascript/widget/components/template/IntegrationCard.vue +++ b/app/javascript/widget/components/template/IntegrationCard.vue @@ -41,7 +41,7 @@ export default { ); this.dyteAuthToken = authToken; } catch (error) { - // Ignore Error for now + console.log(error); } finally { this.isLoading = false; } diff --git a/app/javascript/widget/store/modules/contacts.js b/app/javascript/widget/store/modules/contacts.js index 89af9ea34..380a883cc 100644 --- a/app/javascript/widget/store/modules/contacts.js +++ b/app/javascript/widget/store/modules/contacts.js @@ -31,7 +31,7 @@ export const actions = { const { data } = await ContactsAPI.get(); commit(SET_CURRENT_USER, data); } catch (error) { - // Ignore error + console.log(error); } }, update: async ({ dispatch }, { user }) => { @@ -39,7 +39,7 @@ export const actions = { await ContactsAPI.update(user); dispatch('get'); } catch (error) { - // Ignore error + console.log(error); } }, setUser: async ({ dispatch }, { identifier, user: userObject }) => { @@ -91,14 +91,14 @@ export const actions = { try { await ContactsAPI.setCustomAttributes(customAttributes); } catch (error) { - // Ignore error + console.log(error); } }, deleteCustomAttribute: async (_, customAttribute) => { try { await ContactsAPI.deleteCustomAttribute(customAttribute); } catch (error) { - // Ignore error + console.log(error); } }, }; diff --git a/app/javascript/widget/store/modules/conversation/actions.js b/app/javascript/widget/store/modules/conversation/actions.js index 6d4c26610..507d02132 100644 --- a/app/javascript/widget/store/modules/conversation/actions.js +++ b/app/javascript/widget/store/modules/conversation/actions.js @@ -25,7 +25,7 @@ export const actions = { // Emit event to notify that conversation is created and show the chat screen emitter.emit(ON_CONVERSATION_CREATED); } catch (error) { - // Ignore error + console.log(error); } finally { commit('setConversationUIFlag', { isCreating: false }); } diff --git a/app/javascript/widget/store/modules/conversationAttributes.js b/app/javascript/widget/store/modules/conversationAttributes.js index ddcd8d6e0..0a6098939 100644 --- a/app/javascript/widget/store/modules/conversationAttributes.js +++ b/app/javascript/widget/store/modules/conversationAttributes.js @@ -22,7 +22,7 @@ export const actions = { commit(SET_CONVERSATION_ATTRIBUTES, data); commit('conversation/setMetaUserLastSeenAt', lastSeen, { root: true }); } catch (error) { - // Ignore error + console.log(error); } }, update({ commit }, data) { diff --git a/app/javascript/widget/store/modules/conversationLabels.js b/app/javascript/widget/store/modules/conversationLabels.js index 3ae600082..c1d65827e 100644 --- a/app/javascript/widget/store/modules/conversationLabels.js +++ b/app/javascript/widget/store/modules/conversationLabels.js @@ -9,14 +9,14 @@ export const actions = { try { await conversationLabels.create(label); } catch (error) { - // Ignore error + console.log(error); } }, destroy: async (_, label) => { try { await conversationLabels.destroy(label); } catch (error) { - // Ignore error + console.log(error); } }, }; diff --git a/app/javascript/widget/store/modules/events.js b/app/javascript/widget/store/modules/events.js index 3fa38147d..b60a2b6c0 100644 --- a/app/javascript/widget/store/modules/events.js +++ b/app/javascript/widget/store/modules/events.js @@ -5,7 +5,7 @@ const actions = { try { await events.create(name); } catch (error) { - // Ignore error + console.log(error); } }, }; diff --git a/app/javascript/widget/store/modules/message.js b/app/javascript/widget/store/modules/message.js index 04c2e7af0..aedb55321 100644 --- a/app/javascript/widget/store/modules/message.js +++ b/app/javascript/widget/store/modules/message.js @@ -38,7 +38,7 @@ export const actions = { ); dispatch('contacts/get', {}, { root: true }); } catch (error) { - // Ignore error + console.log(error); } commit('toggleUpdateStatus', false); },