Class: ThreeScale::Core::APIClient::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/3scale/core/api_client/resource.rb

Direct Known Subclasses

APIServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, uri, response, attributes) ⇒ APIError

Returns a new instance of APIError.



9
10
11
12
13
# File 'lib/3scale/core/api_client/resource.rb', line 9

def initialize(method, uri, response, attributes)
  @method, @uri, @response, @attributes = method, uri, response, attributes
  super "#{self.class}: #{response.status} #{method.upcase} #{uri}, attributes:" \
    " #{attributes.inspect}, response.body: #{response.body[0,256]}"
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



7
8
9
# File 'lib/3scale/core/api_client/resource.rb', line 7

def attributes
  @attributes
end

#methodObject (readonly)

Returns the value of attribute method.



7
8
9
# File 'lib/3scale/core/api_client/resource.rb', line 7

def method
  @method
end

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/3scale/core/api_client/resource.rb', line 7

def response
  @response
end

#uriObject (readonly)

Returns the value of attribute uri.



7
8
9
# File 'lib/3scale/core/api_client/resource.rb', line 7

def uri
  @uri
end