AWS QnABot is a multi-channel, multi-language conversational interface (chatbot) that responds to your customer's questions, answers, and feedback. The solution allows you to deploy a fully functional chatbot across multiple channels including chat, voice, SMS and Amazon Alexa.
Describe the bug
QnABot will automatically transform responses that include buttons into the appropriate format using either ResponseCards (for Lex) or InteractiveMessages (for Connect). The solution however, does not adequately defend against the different limits imposed by each of those services.
To Reproduce
Create a new QID with a very long card title, or with 7 buttons. You will notice that asking that question through different clients will yield different responses, not utilize the true maximum provided by those services, and may error out.
Expected behavior
Response should be returned without erroring out, a warning should be logged if response was truncated, and solution should utilize the maximum limits provided by each service.
Please complete the following information about the solution:
[v5.3.1] Version: [e.g. v0.0.1]
[us-east-1] Region: [e.g. us-east-1]
[N] Was the solution modified from the version published on this repository?
[N/A] If the answer to the previous question was yes, are the changes available on GitHub?
[N/A] Have you checked your service quotas for the sevices this solution uses?
[Y] Were there any errors in the CloudWatch Logs?
Invalid Lambda Response: Received invalid response from Lambda: Cannot construct instance of AutoValue_ImageResponseCard$Builder, problem: ImageResponseCard Title is not in range <1,250> at [Source: (String)"{"sessionState":{"sessionAttributes":{"qnabotcontext":"{\"previous\":{\"qid\":\"Button.Test\",\"q\":\"show buttons\"},\"navigation\":{\"next\":\"\",\"previous\":[],\"hasParent\":true}}","appContext":"{\"altMessages\":{},\"responseCard\":{\"version\":\"1\",\"contentType\":\"application/vnd.amazonaws.card.generic\",\"genericAttachments\":[{\"title\":\"https://interactive-msg.s3-us-west-2.amazonaws.com/fruit_34.3kb.jpghttps://interactive-msg.s3-us-west-2.amazonaws.com/fruit_34.3kb.jpghttps://intera"[truncated 5571 chars]; line: 1, column: 6068]
Describe the bug QnABot will automatically transform responses that include buttons into the appropriate format using either ResponseCards (for Lex) or InteractiveMessages (for Connect). The solution however, does not adequately defend against the different limits imposed by each of those services.
To Reproduce Create a new QID with a very long card title, or with 7 buttons. You will notice that asking that question through different clients will yield different responses, not utilize the true maximum provided by those services, and may error out.
Expected behavior Response should be returned without erroring out, a warning should be logged if response was truncated, and solution should utilize the maximum limits provided by each service.
Please complete the following information about the solution:
Screenshots