Open cberiganTAG opened 2 years ago
I think the necessary fix would be to have a default error listener on all consumers if one is not provided OR the sqs-consumer package should be emitting processing_error
instead of error
on batch message handlers throw errors.
This issue is related to #9
The issue is not with @ssut/nestjs-sqs. I am getting the same error using sqs-consumer package
Whenever an error is thrown inside a batch message handler and there is no error event handler method, an uncaught exception is thrown and kills the app.
Steps to reproduce:
@SqsConsumerEventHandler('test', 'error')
.It seems like when I include the error event handler, the error is able to be caught and logged. The app continues to run.
Expectation:
The error event handler should be an opt-in feature. The app should continue to function if individual handlers fail for whatever reason.
Results:
Throws uncaught exception
Also terminates the app.