-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messages without text cause errors in several situations #1211
Comments
@stevengum @v-kydela can you please reopen this? This is not fixed by only fixing choicerecognizer in #1333: if you click a button in an Adaptive Card that does a |
Hi @hansmbakker The community libraries provide an AdaptiveCardPrompt which works with Adaptive Cards: nuget: If you find this does not meet your needs, please open a new issue. |
Hi @EricDahlvang, Does that cover the use case where the button in the card can trigger an optional action, that the user can also decide to trigger a few turns later? When handling it as a prompt, I suppose that the prompt listens for it only once (as a response to the Adaptive Card message from the bot to the user)? |
Version
4.1.5
Describe the bug
There are certain situations involving recognizers (such as when using a choice prompt) where the SDK is unable to respond gracefully to a message with a null or empty
Text
property. Such a message can be generated by a card action or by the user uploading an attachment for example. In these situations, the SDK will throw an error like this (I've abbreviated the stack trace):To Reproduce
Steps to reproduce the behavior:
Data
property which would simulateimBack
behavior instead ofpostBack
)Expected behavior
The SDK should be able to handle textless messages gracefully. A null or empty
Text
property should be treated the same as white space. In the case of a choice prompt, the SDK should respond the same way to a textless message as it would if any other message was received that didn't contain a recognizable choice. In the case of LUIS recognizers, a textless message should probably be recognized as aNone
intent.While it may seem acceptable for a textless message to throw an error in these situations because it means the user is doing something they shouldn't, consider that some developers are trying to incorporate cards into prompts, like in this case: #1202
Screenshots
Additional context
This is related to this issue which was considered fixed: #572
Because the error seems to be showing up in multiple places, I don't want to limit the scope to just one spot in the code. I'm hoping some developers who are more familiar with the code base can implement a solution that applies to every instance of this pattern. The places I've found it are in Find.cs and LuisRecognizer.cs.
[bug]
The text was updated successfully, but these errors were encountered: