Class: Fog::Dtdream::Errors::ServiceError
- Inherits:
-
Errors::Error
- Object
- Errors::Error
- Fog::Dtdream::Errors::ServiceError
- Defined in:
- lib/fog/dtdream/core.rb
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.
10 11 12 |
# File 'lib/fog/dtdream/core.rb', line 10 def response_data @response_data end |
Class Method Details
.slurp(error) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/fog/dtdream/core.rb', line 12 def self.slurp(error) if error.response.body.empty? data = nil = nil else data = Fog::JSON.decode(error.response.body) = data['message'] if .nil? and !data.values.first.nil? = data.values.first['message'] end end new_error = super(error, ) new_error.instance_variable_set(:@response_data, data) new_error end |