You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rest_spec.rb
    path of file: ./repos/puppet/spec/unit/indirector
    
    the code of the file until where you have to start completion: require 'spec_helper
    
  def find(request)
    http = Puppet.runtime[:http]
    response = http.get(URI('http://puppet.example.com:8140/puppet/v3/failing_test_model'))

    if response.code == 404
      return nil unless request.options[:fail_on_404]

      _, body = parse_response(response)
      msg = _("Find %{uri} resulted in 404 with the message: %{body}") % { uri: elide(response.url.path, 100), body: body }
      raise Puppet::Error, msg
    else
      raise convert_to_http_error(response)
    end