diff --git a/lib/hutch/worker.rb b/lib/hutch/worker.rb index 1368839..7ac1ae3 100644 --- a/lib/hutch/worker.rb +++ b/lib/hutch/worker.rb @@ -74,7 +74,7 @@ def handle_message(consumer, delivery_info, properties, payload) @broker.ack(delivery_info.delivery_tag) unless consumer_instance.message_rejected? rescue => ex acknowledge_error(delivery_info, properties, @broker, ex) - handle_error(properties, payload, consumer, ex) + handle_error(properties, payload, consumer, ex, delivery_info) end def with_tracing(klass) @@ -83,7 +83,7 @@ def with_tracing(klass) def handle_error(*args) Hutch::Config[:error_handlers].each do |backend| - backend.handle(*args) + backend.handle *args.first(backend.method(:handle).arity) end end