Exception: LinodeAPI::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- LinodeAPI::APIError
- Defined in:
- lib/linodeapi/errors.rb
Overview
An API error in the body of the HTTP response
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
Instance Method Summary collapse
-
#initialize(resp, msg = 'API Error encountered') ⇒ APIError
constructor
A new instance of APIError.
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
#action ⇒ Object (readonly)
Returns the value of attribute action.
39 40 41 |
# File 'lib/linodeapi/errors.rb', line 39 def action @action end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
39 40 41 |
# File 'lib/linodeapi/errors.rb', line 39 def details @details end |