class KintoBox::Error

Base exception class for all API Client exceptions

Attributes

data[R]
response[R]

Public Class Methods

new(response) click to toggle source
Calls superclass method
# File lib/kinto_box/errors.rb, line 5
def initialize(response)
  @response = response
  @data ||= begin
    JSON.parse(response.body)
  rescue
    {}
  end

  super("#{response.code} #{response.request.uri} #{response.body}")
end