Bot Framework SDK Exception only in cortana channel

Viewed 155

I have got a problem with my cortana skill. Curiosly the exception only occurs if I test the deplyoed code via the cortana channel - if I test the bot itself (e.g. via bot emulator) there is no exception!

Again: The problem is: The Exception below occurs only when I trigger the Dialog via Cortana!

Application Insights:

        POST to xyzBOT failed: POST to the bot's endpoint failed with HTTP status 500POST to the bot's endpoint failed with HTTP status 500

        Failed Method: 
        Microsoft.Bot.ChannelConnector.BotAPI+<PostActivityToBotAsync>d__29.Mo...

        Stack:
        Microsoft.Bot.Schema.BotException
        Microsoft.Bot.ChannelConnector.BotAPI+<PostActivityToBotAsync>d__29.MoveNext
        BotAPI.cs - Line 292

        Interne Exception "System.Exception" handeled at 
        "Microsoft.Bot.ChannelConnector.BotAPI+d__29.MoveNext"
        Microsoft.Bot.ChannelConnector.BotAPI<PostActivityToBotAsync> d__29.MoveNext
        BotAPI.cs - Line 288

[...]

 public class RootDialog : LuisDialog<string>
        {
            [...]
            [LuisIntent(nameof(LUISXY))]
            private async Task LUISXY(IDialogContext context, LuisResult result)
            {
                context.Call(new ZDialog(), null);
            }
        }

[...]

      public class ZDialog: IDialog
        {
            public async Task StartAsync(IDialogContext context)
            {
                ShowOptions(context, true);
            }
        }

      [...]

      private async Task OnOptionSelected(IDialogContext context, IAwaitable<string> result)
            {
                try
                {
                    var optionSelected = await result;

                    if (optionSelected.Equals(AppResources.OptionA))
                    {
                        context.Call(new ADialog(), null);
                    }
                    else if (optionSelected.Equals(AppResources.OptionB))
                    {
                        context.Call(new BDialog(), null);
                    }
                }
                catch (TooManyAttemptsException)
                {
                    await context.PostAsync("Too many attempts");
                    ShowOptions(context, false);
                }
            }
        }
0 Answers
Related