From bad83bfaa452200bb04454a13ee35315d7e85242 Mon Sep 17 00:00:00 2001 From: Shailesh Baldaniya Date: Tue, 4 Oct 2022 22:31:31 +0530 Subject: [PATCH] Fix SF API Endpoint Logs --- helperFunctions/SalesforceAPIHelpers.ts | 10 ++-------- .../CheckChatStatusHelper.ts | 2 +- .../SubscribeToLiveAgentHelper.ts | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/helperFunctions/SalesforceAPIHelpers.ts b/helperFunctions/SalesforceAPIHelpers.ts index 362abf5..4a0de11 100644 --- a/helperFunctions/SalesforceAPIHelpers.ts +++ b/helperFunctions/SalesforceAPIHelpers.ts @@ -5,14 +5,8 @@ import { getError } from '../helperFunctions/Log'; import { getAppSettingValue } from '../lib/Settings'; export const validateResponse = (roomId: string, response) => { - console.debug( - JSON.stringify({ - roomId, - url: response?.url, - statusCode: response?.statusCode, - content: response?.content, - data: response?.data, - }), + console.log( + `{ roomID: ${roomId}, url: ${response?.url}, statusCode: ${response?.statusCode}, content: ${response?.content}, data: ${response?.data}}`, ); if (response.statusCode !== 200) { diff --git a/helperFunctions/subscribeHelpers/InitiateSalesforceSessionHelpers/CheckChatStatusHelper.ts b/helperFunctions/subscribeHelpers/InitiateSalesforceSessionHelpers/CheckChatStatusHelper.ts index ee0748f..3ee1658 100644 --- a/helperFunctions/subscribeHelpers/InitiateSalesforceSessionHelpers/CheckChatStatusHelper.ts +++ b/helperFunctions/subscribeHelpers/InitiateSalesforceSessionHelpers/CheckChatStatusHelper.ts @@ -61,7 +61,7 @@ export class CheckChatStatus { return; } } else { - console.log(InfoLogs.SUCCESSFULLY_RECEIVED_LIVEAGENT_RESPONSE, response); + console.log(InfoLogs.SUCCESSFULLY_RECEIVED_LIVEAGENT_RESPONSE); const { content } = response; const contentParsed = JSON.parse(content || '{}'); const messageArray = contentParsed.messages; diff --git a/helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts b/helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts index eefdfec..997c39a 100644 --- a/helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts +++ b/helperFunctions/subscribeHelpers/SalesforceAgentAssignedHelpers/SubscribeToLiveAgentHelper.ts @@ -55,7 +55,7 @@ export class SubscribeToLiveAgent { return; } } else { - console.log(InfoLogs.SUCCESSFULLY_RECEIVED_LIVEAGENT_RESPONSE, response); + console.log(InfoLogs.SUCCESSFULLY_RECEIVED_LIVEAGENT_RESPONSE); const { content } = response; const contentParsed = JSON.parse(content || '{}'); const messageArray = contentParsed.messages;