From 3a6ca54a6e8ad353f207bc85433d1204b5ca48bc Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Wed, 4 Aug 2010 22:34:33 +0200 Subject: Fix #4458 - Do not dump the whole environment when instances can't be found When generating the error message when we can't find any instances for a search request, we were "inspect"ing the request which now contains an environment instance which itself contains a lots of things (including all the known resource types). Thus it was generating a very large "reason" (ie the HTTP error string). On some environments (ie proxied mongrel) this was too large and the proxy would produce an error 500. I just changed the error message to just log the indirection name and request key (which should be enough to understand what is wrong). Signed-off-by: Brice Figureau --- lib/puppet/network/http/handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/network/http/handler.rb b/lib/puppet/network/http/handler.rb index 03d24b3fe..61ae2d2fc 100644 --- a/lib/puppet/network/http/handler.rb +++ b/lib/puppet/network/http/handler.rb @@ -117,7 +117,7 @@ module Puppet::Network::HTTP::Handler result = indirection_request.model.search(indirection_request.key, indirection_request.to_hash) if result.nil? or (result.is_a?(Array) and result.empty?) - return do_exception(response, "Could not find instances in #{indirection_request.indirection_name} with '#{indirection_request.to_hash.inspect}'", 404) + return do_exception(response, "Could not find instances in #{indirection_request.indirection_name} with '#{indirection_request.key}'", 404) end format = format_to_use(request) -- cgit