lib/shippinglogic/fedex/response.rb in binarylogic-shippinglogic-1.0.4 vs lib/shippinglogic/fedex/response.rb in binarylogic-shippinglogic-1.0.5
- old
+ new
@@ -4,16 +4,16 @@
module Response
SUCCESSFUL_SEVERITIES = ["SUCCESS", "NOTE", "WARNING"]
private
# Overwriting the request method to clean the response and handle errors.
- def request(*args)
+ def request(body)
response = clean_response(super)
if success?(response)
response
else
- raise Error.new(response)
+ raise Error.new(body, response)
end
end
# Was the response a success?
def success?(response)
\ No newline at end of file