summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-08-04 22:34:33 +0200
committerMarkus Roberts <Markus@reality.com>2010-08-04 17:49:15 -0700
commit3a6ca54a6e8ad353f207bc85433d1204b5ca48bc (patch)
treeea06161f75ee884d9489359ace3fb69fd958fabd /lib
parentd909827942fa571bea202818c92d081e7957a574 (diff)
downloadpuppet-3a6ca54a6e8ad353f207bc85433d1204b5ca48bc.tar.gz
puppet-3a6ca54a6e8ad353f207bc85433d1204b5ca48bc.tar.xz
puppet-3a6ca54a6e8ad353f207bc85433d1204b5ca48bc.zip
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 <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/network/http/handler.rb2
1 files changed, 1 insertions, 1 deletions
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)