Exception: CF::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/cf/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, response_body: nil, response_headers: nil) ⇒ APIError

Returns a new instance of APIError.



13
14
15
16
17
18
# File 'lib/cf/errors.rb', line 13

def initialize(message, status: nil, response_body: nil, response_headers: nil)
  super(message)
  @status = status
  @response_body = response_body
  @response_headers = response_headers
end

Instance Attribute Details

#response_bodyObject (readonly)

Returns the value of attribute response_body.



11
12
13
# File 'lib/cf/errors.rb', line 11

def response_body
  @response_body
end

#response_headersObject (readonly)

Returns the value of attribute response_headers.



11
12
13
# File 'lib/cf/errors.rb', line 11

def response_headers
  @response_headers
end

#statusObject (readonly)

Returns the value of attribute status.



11
12
13
# File 'lib/cf/errors.rb', line 11

def status
  @status
end