lib/reviewed/client.rb in reviewed-0.4.2 vs lib/reviewed/client.rb in reviewed-0.4.3

- old
+ new

@@ -74,10 +74,10 @@ begin res = self.connection.send(method.to_sym, path, params) do |request| request.params.merge!(self.request_params) request.headers['X-Reviewed-Authorization'] ||= self.api_key end - raise Reviewed::ApiError.new(msg: "API connection returned redirect or error") if res.status > 204 and res.status != 404 + raise Reviewed::ApiError.new(msg: "API connection returned redirect or error: status=#{res.status}") if res.status > 204 and res.status != 404 res rescue Faraday::Error::ClientError => e message = <<-EOS.gsub(/^[ ]*/, '') API Error. method: #{method} url: #{base_uri} path: #{path} params: #{params.to_s} api_key: #{self.api_key} Original exception message: