extract retry exception logic from Sidekiq::Middleware::Server::RetryJobs#call into separate method