Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.Bot.Schema.ErrorResponseException: Operation returned an invalid status code 'BadRequest'

Thanks for taking a look at my questions.

The exception of the application exactly as the title.

It was deployed at the AWS server and was integrating with Skype.

The Microsoft.Bot.Schema.ErrorResponseException did not happen when I'm testing my application on local with bot emulator.

It happens only when on Skype.

Env:

  • Microsoft.Bot.Builder 4.2.2
  • Microsoft.Bot.Builder.AI.Luis 4.2.2
  • Microsoft.Bot.Builder.AI.QnA 4.2.2
  • Microsoft.Bot.Connector 4.2.2
Microsoft.Bot.Schema.ErrorResponseException: Operation returned an invalid status code 'BadRequest'
at Microsoft.Bot.Connector.Conversations.ReplyToActivityWithHttpMessagesAsync(String conversationId, String activityId, Activity activity, Dictionary`2 customHeaders, CancellationToken cancellationToken)
at Microsoft.Bot.Connector.ConversationsExtensions.ReplyToActivityAsync(IConversations operations, String conversationId, String activityId, Activity activity, CancellationToken cancellationToken)
at Microsoft.Bot.Builder.BotFrameworkAdapter.SendActivitiesAsync(ITurnContext turnContext, Activity[] activities, CancellationToken cancellationToken)
at Microsoft.Bot.Builder.TurnContext.<>c__DisplayClass22_0.<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---

Did anyone know possible reasons of this bug?

Again, thank you so much for helping me.

like image 643
Px Aut Avatar asked Oct 20 '25 01:10

Px Aut


1 Answers

Because in the message that I sent, it contains HTML tags. So that may crash the application.

like image 143
Px Aut Avatar answered Oct 21 '25 16:10

Px Aut



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!