class RuboCop::RemoteConfig
def handle_response(response, limit, &block)
def handle_response(response, limit, &block) case response when Net::HTTPSuccess, Net::HTTPNotModified, SocketError yield response when Net::HTTPRedirection request(URI.parse(response['location']), limit - 1, &block) else begin response.error! rescue StandardError => e message = "#{e.message} while downloading remote config file #{cloned_url}" raise e, message end end end