lib/soapy_cake/response.rb in soapy_cake-2.2.7 vs lib/soapy_cake/response.rb in soapy_cake-2.3.0

- old
+ new

@@ -57,10 +57,11 @@ # This saves a lot of time because we don't have to scan the whole XML tree for errors. return if body.length > 8192 error_check_fault! return if error_check_special_case? + error_check_success! end def error_check_fault! fault = sax.for_tag(:fault).first @@ -68,9 +69,10 @@ end def error_check_success! return if sax.for_tag(:success).first == 'true' raise RateLimitError if error_message == 'Restricted' + raise RequestFailed, error_message end def error_check_special_case? # Don't ask...