If an error occurs while trying to contact an external server,
PuppetHttps.get passes on the exception to the caller.

Paired-with: Nick Lewis   <[email protected]>
Signed-off-by: Paul Berry <[email protected]>
---
Local-branch: ticket/next/5171-config-filebucket
 lib/puppet_https.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/puppet_https.rb b/lib/puppet_https.rb
index 50fe05c..310af22 100644
--- a/lib/puppet_https.rb
+++ b/lib/puppet_https.rb
@@ -29,6 +29,7 @@ class PuppetHttps
     url = URI.parse(url)
     req = Net::HTTP::Get.new("#{url.path}?#{url.query}", "Accept" => accept)
     res = make_ssl_request(url, req, authenticate)
+    res.error! unless res.code_type == Net::HTTPOK
     res.body
   end
 end
-- 
1.7.2

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to