Skip to content
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

Return invalid state instead of throwing exceptions for non-string input of TextInput action #4966

Merged

Conversation

feich-ms
Copy link
Contributor

@feich-ms feich-ms commented Nov 13, 2020

Fixes #4948

Description

In adaptive dialog, TextInput action only accept string values, but in some cases, non-string values such as objects will be passed into TextInput action, in such cases, it will throw exceptions instead of throw invalid prompt to users for a valid input. This is not friendly. In this fix, we added the validation of string format for all values and if it's value is not string, it will go into invalid state instead of throwing exceptions.

Specific Changes

  • TextInput.cs

Testing

Test cases added

@feich-ms feich-ms changed the title Fix: go to Unrecognized state instead of throwing exceptions for non-string input of TextInput action Return unrecognized state instead of throwing exceptions for non-string input of TextInput action Nov 13, 2020
@mrivera-ms
Copy link
Contributor

This was reviewed by the SDK team. Rerunning failing check. Will merge if it passes.

@mrivera-ms
Copy link
Contributor

The only failure is on [experimental]Dummy-build. Ignoring this failure.

@mrivera-ms mrivera-ms merged commit bdc9c1f into main Nov 18, 2020
@mrivera-ms mrivera-ms deleted the feich/fixTextInputActionThrowExceptionForNonStringValue branch November 18, 2020 18:24
@feich-ms feich-ms changed the title Return unrecognized state instead of throwing exceptions for non-string input of TextInput action Return invalid state instead of throwing exceptions for non-string input of TextInput action Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextInput throwing when input is not in string format
2 participants