Closed michaelwittig closed 2 years ago
I believe I had a similar issue in my application. The stack trace didn't help, but my application got killed due to unhandled exception/rejection (my app is configured to die if such thing happen). The reason was changeMessageVisibility call that failed.
By inspecting the code of sqs-consumer, I believe the reason is that inside the methods changeVisabilityTimeoutBatch
and changeVisabilityTimeout
they do not "await" the promise; therefore the try {} catch {}
does not catch the error. It also happens because those who call it do not catch any errors (one is inside a timer and the other is inside a catch block).
I believe adding the await
should fix the issue.
the issue is fixed. Thanks @rafael-pb
Describe the bug If the call to
changeVisabilityTimeout
fails, the Promise is rejected but no one notices. Node.js complains about this with anTo Reproduce Steps to reproduce the behaviour:
Expected behaviour I'm not sure but it could be an
error
event?I'm willing to provide a fix if we can agree on what's expected.