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

Lex and Connect client throw errors when buttons exceed response limits #593

Closed
ihmaws opened this issue Apr 17, 2023 · 1 comment
Closed
Labels

Comments

@ihmaws
Copy link
Member

ihmaws commented Apr 17, 2023

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]

Screenshots
image

@ihmaws ihmaws added the bug label Apr 17, 2023
tabdunabi added a commit that referenced this issue Apr 17, 2023
### Added

- Added new parameter for configurable Opensearch EBS Volume Size (#567)
- Added MetricsBucket to stack outputs (#571)

### Fixed

- Fix Lambda Embeddings documentation with correct event definition (#576)
- Fix broken urls in prairielinetrail tour example (#577)
- Fix bug causing CONNECT_IGNORE_WORDS from working correctly (#589)
- Fix QIDs not matching correctly when the score is less than 1 (#592)
- Improved handling of Lex and Connect response limits (#593)

### Updated

- Security patches for npm and pip packages
- Update Connect Interactive Message limits
tabdunabi added a commit that referenced this issue Apr 18, 2023
### Added

- Added new parameter for configurable Opensearch EBS Volume Size (#567)
- Added MetricsBucket to stack outputs (#571)

### Fixed

- Fix Lambda Embeddings documentation with correct event definition (#576)
- Fix broken urls in prairielinetrail tour example (#577)
- Fix bug causing CONNECT_IGNORE_WORDS from working correctly (#589)
- Fix QIDs not matching correctly when the score is less than 1 (#592)
- Improved handling of Lex and Connect response limits (#593)
@ihmaws
Copy link
Member Author

ihmaws commented Apr 18, 2023

Fixed as of v5.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant