class Aws::Plugins::RetryErrors::LegacyHandler

def call(context)

def call(context)
  response = @handler.call(context)
  if response.error
    error_inspector = Retries::ErrorInspector.new(
      response.error, response.context.http_response.status_code
    )
    if error_inspector.endpoint_discovery?(context)
      key = context.config.endpoint_cache.extract_key(context)
      context.config.endpoint_cache.delete(key)
    end
    retry_if_possible(response, error_inspector)
  else
    response
  end
end