Class: Fog::Proxmox::Errors::ServiceError
- Inherits:
-
Errors::Error
- Object
- Errors::Error
- Fog::Proxmox::Errors::ServiceError
- Defined in:
- lib/fog/proxmox/errors.rb
Overview
class ServiceError
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response_data ⇒ Object
readonly
Returns the value of attribute response_data.
Class Method Summary collapse
Instance Attribute Details
#response_data ⇒ Object (readonly)
Returns the value of attribute response_data.
25 26 27 |
# File 'lib/fog/proxmox/errors.rb', line 25 def response_data @response_data end |
Class Method Details
.slurp(error) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/fog/proxmox/errors.rb', line 27 def self.slurp(error) if error.response.body.empty? data = nil = nil else data = Fog::JSON.decode(error.response.body) = data['message'] data1 = data.values.first = data1['message'] if .nil? && !data1.nil? end new_error = super(error, ) new_error.instance_variable_set(:@response_data, data) new_error end |