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

SQS Infinite Loop with Empty Entitlements #52

Open
fernando-mc opened this issue Aug 1, 2022 · 0 comments
Open

SQS Infinite Loop with Empty Entitlements #52

fernando-mc opened this issue Aug 1, 2022 · 0 comments

Comments

@fernando-mc
Copy link

Describe the bug

When the AWS Marketplace service returns empty entitlements the application errors and is thrown into an infinite loop.

To Reproduce
Steps to reproduce the behavior:

You can test this with an event that has empty entitlements:
Screen Shot 2022-08-01 at 9 13 38 AM

For a simple example. Comment out this line in entitlement-sqs.js:
const entitlementsResponse = await marketplaceEntitlementService.getEntitlements(entitlementParams).promise();

And replace it with something like:

const entitlementsResponse = {'Entitlements': []}

Then, trigger the function.

  1. The function will error as shown in the screenshot (Which happened because a response from AWS in that structure was returned when actually calling the entitlements service).

Expected behavior
Either the marketplace service API call doesn't return an empty entitlement, OR a DLQ and better error handling is added to this application so that events like this are sent to the DLQ instead of being retried.

Screenshots

Screen Shot 2022-08-01 at 8 48 43 AM

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome

Additional context
Also feel free to reach out: fernando.medina.corey(at)telcodr(dot)com to discuss.

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

No branches or pull requests

1 participant