question

MeetBhatt-9179 avatar image
0 Votes"
MeetBhatt-9179 asked JerryXu-MSFT edited

Microsoft Web Chat Bot-framework returns 502 error

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-bot-service
bot.png (32.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GiftA-MSFT avatar image
0 Votes"
GiftA-MSFT answered

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.