Karthi
Karthi

Reputation: 31

Microsoft bot V4 Skill Bot responds with 500(Internal error) when replied to Root bot at SendActivityAsync function

I'm trying Master and Skill bot functionality by calling Microsoft Sample EchoSkillBot from Master Bot developed by me. Call reached Skill bot from Master but while Skill bot replying to Master getting the exception "InternalServerError". Additional note I'm using LUIS to route the conversations to respective Skill and QnA.

Code: (Exception thrown at this code)

await turnContext.SendActivityAsync(
           MessageFactory.Text(messageText, 
                               messageText, 
                               InputHints.IgnoringInput), 
           cancellationToken);

Error:

"{"type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","title":"An error occured while processing your request.","status":500,"traceId":"XXXXX"}"

"Operation returned an invalid status code 'InternalServerError'"

Upvotes: 2

Views: 428

Answers (1)

Karthi
Karthi

Reputation: 31

I found the root cause for the exception. In startup.cs I had used Bot framework adapter as IBotFrameworkHttpAdapter in one place and other place BotFrameworkHttpAdapter. After fixing this Skill reply worked fine.

   // Create the Bot Framework Adapter with error handling enabled.
   //services.AddSingleton<IBotFrameworkHttpAdapter, AdapterWithErrorHandler>();
     services.AddSingleton<BotFrameworkHttpAdapter, AdapterWithErrorHandler>();
     services.AddSingleton<BotAdapter>(sp => sp.GetService<BotFrameworkHttpAdapter>());  //Added for Skill bot

Upvotes: 1

Related Questions