diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2010-08-04 22:34:33 +0200 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-08-04 17:49:15 -0700 |
commit | 3a6ca54a6e8ad353f207bc85433d1204b5ca48bc (patch) | |
tree | ea06161f75ee884d9489359ace3fb69fd958fabd /lib | |
parent | d909827942fa571bea202818c92d081e7957a574 (diff) | |
download | puppet-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.rb | 2 |
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) |