def handle_redirect(redirect, type, request_uuid)
      Log.info("Received REDIRECT #{redirect} for #{type} request <#{request_uuid}>")
      if redirect.respond_to?(:response) && (location = redirect.response.headers[:location]) && !location.empty?
        Log.info("Requesting auth client to handle redirect to #{location.inspect}")
        @stats["reconnects"].update("redirect")
        @auth_client.redirect(location)
        raise Exceptions::RetryableError.new(redirect.http_body, redirect)
      else
        raise Exceptions::InternalServerError.new("No redirect location provided", @options[:server_name])
      end
      true
    end
def handle_redirect(redirect, type, request_uuid)
      Log.info("Received REDIRECT #{redirect} for #{type} request <#{request_uuid}>")
      if redirect.respond_to?(:response) && (location = redirect.response.headers[:location]) && !location.empty?
        Log.info("Requesting auth client to handle redirect to #{location.inspect}")
        @stats["reconnects"].update("redirect")
        @auth_client.redirect(location)
        raise Exceptions::RetryableError.new(redirect.http_body, redirect)
      else
        raise Exceptions::InternalServerError.new("No redirect location provided", @options[:server_name])
      end
      true
    end
Treat redirect response as indication that no longer accessing the correct shard
 Handle it by informing auth client so that it can re-authorize
 Do not retry, but tell client to with the expectation that re-auth will correct the situation

 @param [RestClient::MovedPermanently, RestClient::Found] redirect exception raised
 @param [String] type of request for use in logging
 @param [String] request_uuid originally created for this request

 @return [TrueClass] never returns

 @raise [Exceptions::RetryableError] request redirected but if retried may succeed
 @raise [Exceptions::InternalServerError] no redirect location provided