summaryrefslogtreecommitdiff
path: root/lib/chef/http.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2015-11-03 13:17:08 -0800
committerdanielsdeleo <dan@chef.io>2015-11-04 08:34:00 -0800
commit6ca75bb1c67f9281531b72ec6fb95a655022d71a (patch)
treeee52d6951db296651828d453b449fa16ca2c49e9 /lib/chef/http.rb
parent14163f0068d423f1fc1e67d4b3b8dbba5fd86c0f (diff)
downloadchef-6ca75bb1c67f9281531b72ec6fb95a655022d71a.tar.gz
Re-raise SSL errors after retry w/ correct class
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r--lib/chef/http.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb
index 66f8e49680..28bbef3828 100644
--- a/lib/chef/http.rb
+++ b/lib/chef/http.rb
@@ -329,13 +329,13 @@ class Chef
retry
end
raise Timeout::Error, "Timeout connecting to #{url}, giving up"
- rescue OpenSSL::SSL::SSLError
+ rescue OpenSSL::SSL::SSLError => e
if http_retry_count - http_attempts + 1 > 0
Chef::Log.error("SSL Error connecting to #{url}, retry #{http_attempts}/#{http_retry_count}")
sleep(http_retry_delay)
retry
end
- raise Timeout::Error, "SSL Error connecting to #{url}, giving up"
+ raise OpenSSL::SSL::SSLError, "SSL Error connecting to #{url} - #{e.message}"
end
end