Exception: Cic::Exception::APIError

Inherits:
CicError
  • Object
show all
Defined in:
lib/cic/errors.rb

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_status, response_body, error_info = nil) ⇒ APIError

Returns a new instance of APIError.



9
10
11
12
# File 'lib/cic/errors.rb', line 9

def initialize(http_status, response_body, error_info = nil)
  message = " [HTTP #{http_status}] #{response_body}"
  super(message)
end

Instance Attribute Details

#http_statusObject

Returns the value of attribute http_status.



7
8
9
# File 'lib/cic/errors.rb', line 7

def http_status
  @http_status
end

#response_bodyObject

Returns the value of attribute response_body.



7
8
9
# File 'lib/cic/errors.rb', line 7

def response_body
  @response_body
end