Exception: LinodeAPI::APIError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/linodeapi/errors.rb

Overview

An API error in the body of the HTTP response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resp, msg = 'API Error encountered') ⇒ APIError

Returns a new instance of APIError.



41
42
43
44
45
# File 'lib/linodeapi/errors.rb', line 41

def initialize(resp, msg = 'API Error encountered')
  @action = resp['ACTION']
  @details = resp['ERRORARRAY']
  super(msg)
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



39
40
41
# File 'lib/linodeapi/errors.rb', line 39

def action
  @action
end

#detailsObject (readonly)

Returns the value of attribute details.



39
40
41
# File 'lib/linodeapi/errors.rb', line 39

def details
  @details
end