-
Notifications
You must be signed in to change notification settings - Fork 334
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
Differentiate between internal and external events #16
Comments
Not currently no. Arguably we shouldn't really be firing the error event when the processMessage function returns an error. Would this change make things clearer for you? You always have access to the processMessage error anyway as it comes from your code. |
This would mean that only errors polling/deleting are surfaced by the error event. |
This would essentially solve the problem at the cost of a minor inconvenience as I'm using this event to log our own events in different ways. I'd have to write a proxy callback to get errors from handlers, log them and call the real callback. I guess a good solution would be to have 2 separate events for each type of error. |
I've added a pr for this. #20 |
Fixed in #20. Released as 3.0.0 https://github.com/bbc/sqs-consumer/releases/tag/v3.0.0. |
Is there a way to tell if an error was raised by client code (one of the message processing handlers) or by the library (sqs-consumer) internally without manually checking for all types of events sqs-consumer could possibly raise?
The text was updated successfully, but these errors were encountered: