-
Notifications
You must be signed in to change notification settings - Fork 38
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
Improve Error Handling for Large Payloads #561
Comments
wow this is funny…
!!! |
whoa maybe I should start using queues more? I would always just default to creating an event and add some concurrency but that's a pretty big diff |
Well, it depends, queues are for for when you don't want concurrency. They are designed for throttling "first in first out". An example would be you need to call an API but are rate limited to 1 request per second. If you have two users making requests one will get throttled and fail…unless if you use a queue and enqueue requests to throttle them (on your side) to 1rps. Events are the opposite. The pattern is "fan out" when you want to 1-many broadcast as fast as possible. |
aha! that makes sense. thank you for the explanation 🤠 |
Describe the issue
When publishing a payload via SNS (and probably SQS too) that is too large, the response should provide a better warning/message. Instead a TypeError is thrown because there is no Error message in the response
Steps to reproduce
Steps to reproduce the behavior:
arc.events.publish(...)
)TypeError: @aws-lite/client: SNS.Publish: Cannot read properties of null (reading 'Error')
Expected behavior
A clear message indicating why the message was unable to be processed (in our case, too big!)
Screenshots
The text was updated successfully, but these errors were encountered: