summaryrefslogtreecommitdiff
path: root/lib/chef/http.rb
diff options
context:
space:
mode:
authorHui Hu <huh@vmware.com>2014-09-04 16:57:32 +0800
committerHui Hu <huh@vmware.com>2014-09-04 16:57:32 +0800
commit3d3aa968f88ed27dcaf19aa82c730cf34cce7441 (patch)
treef3cf6123bc5a3c463135f51bb9732dd7f01de7b9 /lib/chef/http.rb
parentace6c1e64fa32efcb9beeb8238edb1d71dab659d (diff)
downloadchef-3d3aa968f88ed27dcaf19aa82c730cf34cce7441.tar.gz
read http_retry_count from chef config in the spec; add HTTP error code in the log.
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r--lib/chef/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb
index bdfd30f140..7f2d00157b 100644
--- a/lib/chef/http.rb
+++ b/lib/chef/http.rb
@@ -296,7 +296,7 @@ class Chef
if response.kind_of?(Net::HTTPServerError)
if http_retry_count - http_attempts + 1 > 0
sleep_time = 1 + (2 ** http_attempts) + rand(2 ** http_attempts)
- Chef::Log.error("Server returned error for #{url}, retrying #{http_attempts}/#{http_retry_count} in #{sleep_time}s")
+ Chef::Log.error("Server returned error #{response.code} for #{url}, retrying #{http_attempts}/#{http_retry_count} in #{sleep_time}s")
sleep(sleep_time)
redo
end