lib/fanforce/api/response.rb in fanforce-api-0.14.7 vs lib/fanforce/api/response.rb in fanforce-api-0.14.8

- old
+ new

@@ -1,19 +1,8 @@ class Fanforce::API::Response attr_reader :curl_command, :requested_url, :requested_params def self.process(response, request, requested_url, requested_params) - if response.code > 201 - puts "FANFORCE API CRAPPED OUT: #{response.code}" - puts response.args.to_json - puts '--------------------------------------' - puts response.args[:payload] - puts '--------------------------------------' - puts response.body - puts '--------------------------------------' - puts response.net_http_res - end - raise Fanforce::API::ServerError.new(response, request, requested_url, requested_params) if response.code > 201 begin response_hash = Fanforce::Utils.decode_json(response) rescue Exception => e; raise Fanforce::API::DecodingError.new(e, response, request, requested_url, requested_params) end if response_hash[:results] Fanforce::API::Results.new(response_hash, response, request, requested_url, requested_params)