Method: Pipl::Client::APIError.from_http_response

Defined in:
lib/pipl/errors.rb

.from_http_response(resp) ⇒ Object



45
46
47
48
49
50
51
# File 'lib/pipl/errors.rb', line 45

def self.from_http_response(resp)
  begin
    self.deserialize(resp.body, resp)
  rescue
    Pipl::Client::APIError.new resp.message, resp.code
  end
end