Skip to content

Commit

Permalink
Merge pull request #80 from WideChat/fix/api-log
Browse files Browse the repository at this point in the history
[FIX] SF API Endpoint Logs
  • Loading branch information
ear-dev authored Oct 4, 2022
2 parents ccc4582 + bad83bf commit 4d84692
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions helperFunctions/SalesforceAPIHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d84692

Please sign in to comment.