lib/soapy_cake/response.rb in soapy_cake-1.21.0 vs lib/soapy_cake/response.rb in soapy_cake-1.22.0

- old
+ new

@@ -61,16 +61,16 @@ error_check_success! end def error_check_fault! fault = sax.for_tag(:fault).first - fail RequestFailed, fault[:reason][:text] if fault + raise RequestFailed, fault[:reason][:text] if fault end def error_check_success! - return if sax.for_tag(:success).first == 'true'.freeze - fail RateLimitError if error_message == 'Restricted'.freeze - fail RequestFailed, error_message + 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... # As you might imagine, CAKE simply does not return the success element