AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

BadRequest error with MS Teams

Open dkonyayev opened this issue 8 years ago • 5 comments

Platform

What platform is your issue or question related to? (Delete other platforms).

BotFramework, AdoptiveCards on MS Teams

Version of SDK

1.0.2

Issue

When returning a AdoptiveCard attachment to MS Teams client I get an odd error. I am not in Developer Preview, but the error seems to occur on server side. I have traced it all the way to context.PostAsync function, and the error occurs somewhere in there. I am able to have regular text chat with MS Teams.

Microsoft.Bot.Connector.ErrorResponseException: Operation returned an invalid status code 'BadRequest'

dkonyayev avatar Oct 02 '18 01:10 dkonyayev

This morning I activated "Developer Preview" on my MS Teams and still got the same message. I am able to display a very simple card (just textbox and few action buttons). The card that it fails on is more complicated and has ChoiseSet, Date, Time, and Number Input controls.

dkonyayev avatar Oct 02 '18 13:10 dkonyayev

@dkonyayev can you share JSON payload of the card ?

rednivrug15 avatar Oct 02 '18 17:10 rednivrug15

@rednivrug15 see attached file 1986_sample_json.txt

dkonyayev avatar Oct 02 '18 19:10 dkonyayev

@dkonyayev I think the issue is with the min value of Input.Number ( currently it is Nan which is causing the server to reject the payload ) . Can you please try changing it to a number ?.

rednivrug15 avatar Oct 03 '18 03:10 rednivrug15

That was it. Thanks!

dkonyayev avatar Oct 03 '18 13:10 dkonyayev