Microsoft Web Chat Bot-framework returns 502 error

Meet Bhatt 21 Reputation points
2021-03-23T09:38:57.02+00:00

Hi Everyone,

I am trying to connect bot with Angular via DirectLine using below code.

Kindly refer below error screenshot,
80594-bot.png

Kindly refer below code snippet,

window.WebChat.renderWebChat(
{
directLine: this.botConnection,
userID: environment._spPageContextInfo.userId,
username: environment._spPageContextInfo.userDisplayName,
store,
locale: "en-US",
styleOptions: { hideUploadButton: true },
},
document.getElementById("webchat")
);

Please let me know your thoughts on the same.

Thanks & Regards,
Meet Bhatt

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
745 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GiftA-MSFT 11,151 Reputation points
    2021-03-23T17:03:38.387+00:00

    Hi, Direct Line 3.0 returns HTTP status code 502 when it tries to contact your bot but the request does not complete successfully. This error indicates that either the bot returned an error or the request timed out. For more information about errors that your bot generates, go to the bot's dashboard within the Azure Portal and click the "Issues" link for the affected channel. If you have Application Insights configured for your bot, you can also find detailed error information there. I also suggest that you try debugging your bot and ensure that your bot is configured appropriately.

    0 comments No comments