From 8c6a9e94629c0a8b964f0a3b13eab742c3800841 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 27 Nov 2023 12:00:09 -0500 Subject: [PATCH] Take third parameter for Sidekiq error_handler (#1136) In https://github.com/sidekiq/sidekiq/commit/287051673f050b39c9ad985c1c21a3488dbbbd3a Sidekiq starts accepting a the Sidekiq Configuration option as a parameter to error_handlers and marks two parameter handlers as deprecated. This change adds a third parameter to the handler to accept that configuration and defaults the value to `nil` since 1. Older versions of Sidekiq will not pass a third parameter 2. Rollbar does not need to do anything with that value (yet?) --- lib/rollbar/plugins/sidekiq.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rollbar/plugins/sidekiq.rb b/lib/rollbar/plugins/sidekiq.rb index 08f0b84c..a0e372a0 100644 --- a/lib/rollbar/plugins/sidekiq.rb +++ b/lib/rollbar/plugins/sidekiq.rb @@ -12,7 +12,7 @@ chain.add Rollbar::Sidekiq::ResetScope end - config.error_handlers << proc do |e, context| + config.error_handlers << proc do |e, context, _sidekiq_config = nil| Rollbar::Sidekiq.handle_exception(context, e) end end