botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

LuisIntent with empty code causes an exception

Open kevinport opened this issue 10 years ago • 2 comments

If you write an LuisIntent-Method without code, the next message the user sends to the bot causes an exception.

[LuisIntent("Login")] public async Task Login(IDialogContext context, LuisResult result) { }

Now if the user trigger the LoginIntent, the empty Method is called. After that if the user sends an other message to the bot, the following exception is thrown.

Exception thrown: 'Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedException' in Microsoft.Bot.Builder.dll

Additional information: invalid need: expected Wait, have Done

From: public static void ValidateNeed(this IWait wait, Need need) { if (need != wait.Need) { throw new InvalidNeedException(wait, need); } }

kevinport avatar Aug 15 '16 19:08 kevinport

It looks like you're running into this issue:

https://docs.botframework.com/en-us/technical-faq/#ensure-all-dialog-methods-end-with-a-plan-to-handle-the-next-message

willportnoy avatar Aug 15 '16 19:08 willportnoy

Oh thanks :+1:

kevinport avatar Aug 15 '16 19:08 kevinport