Permalink
Browse files

Fix #26. Raise an exception immediately if the response is a 5xx Serv…

…er Error.
  • Loading branch information...
1 parent 823fddc commit d58a13b8d750878234b20da3dc6e58db23a9001d @grempe committed Nov 21, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/AWS.rb
View
@@ -338,6 +338,8 @@ def aws_error?(response)
# exceptions.rb
return false if response.is_a?(Net::HTTPSuccess)
+ raise AWS::Error, "Unexpected server error. response.body is: #{response.body}" if response.is_a?(Net::HTTPServerError)
+
# parse the XML document so we can walk through it
doc = REXML::Document.new(response.body)

0 comments on commit d58a13b

Please sign in to comment.