MicrosoftDocs / AdaptiveCards

Docs for Adaptive Cards
https://docs.microsoft.com/en-us/adaptive-cards/
Creative Commons Attribution 4.0 International
73 stars 140 forks source link

Incomplete Docs: What should be the error response for adaptive card actions? #553

Closed ILMCTS closed 2 months ago

ILMCTS commented 2 months ago

https://github.com/MicrosoftDocs/AdaptiveCards/blob/a5d7403042d00acb58c0260d7a77156b89b5cc05/AdaptiveCards/authoring-cards/universal-action-model.md?plain=1#L217-L225

The docs for the error type are just a "todo".

Could you give me an example what i should return for the following types:

ILMCTS commented 2 months ago

Update, I ended up discovering theres a factory for these types:

using Microsoft.TeamsFx.Conversation;

var invokeRes = InvokeResponseFactory.ErrorResponse(InvokeResponseErrorCode.BadRequest, "Invalid Data");

return (AdaptiveCardInvokeResponse)res.Body;