class LHC::Rollbar < LHC::Interceptor include ActiveSupport::Configurable def after_response(response) return unless Object.const_defined?('Rollbar') request = response.request additional_params = request.options.fetch(:rollbar, {}) error = LHC::Error.find(response) data = { response: response, request: request }.merge additional_params Rollbar.error( error, data ) end end