Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Log escalation failure if SF bot is offline/disabled #56

Merged
merged 2 commits into from
Apr 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,16 @@ export const performHandover = async (modify: IModify, read: IRead, rid: string,
throw new Error(`${Logs.HANDOVER_REQUEST_FAILED_ERROR} ${error}`);
});
if (!result) {
const offlineMessage: string = await getAppSettingValue(read, AppSetting.DialogflowServiceUnavailableMessage);
const offlineMessage: string = await getAppSettingValue(read, AppSetting.DialogflowServiceUnavailableMessage),
handoverFailure = {
error: offlineMessage,
errorMessage: 'Unable to reach Liveagent bot, it may be offline or disabled.',
dialogflow_SessionID: rid,
visitorDetails: (({ id, token }) => ({ id, token }))(visitor),
targetDepartment: livechatTransferData.targetDepartment
}

console.log('Failed to handover', handoverFailure);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itzzritik can you use this from now on when we add new log points please..... JSON.stringify(handoverFailure)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, will take care

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks.... I'll test

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itzzritik I'm not yet able to get this to work.... maybe tomorrow you can demo for us how this should work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ear-dev I have updated the description, with steps to reproduce, please have a look.


await createMessage(rid, read, modify, { text: offlineMessage ? offlineMessage : DefaultMessage.DEFAULT_DialogflowHandoverFailedMessage });

Expand Down