Class: Fog::OpenStack::Errors::BadRequest

Inherits:
ServiceError
  • Object
show all
Defined in:
lib/fog/openstack/core.rb

Instance Attribute Summary collapse

Attributes inherited from ServiceError

#response_data

Class Method Summary collapse

Instance Attribute Details

#validation_errorsObject (readonly)

Returns the value of attribute validation_errors.



33
34
35
# File 'lib/fog/openstack/core.rb', line 33

def validation_errors
  @validation_errors
end

Class Method Details

.slurp(error) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/fog/openstack/core.rb', line 35

def self.slurp(error)
  new_error = super(error)
  unless new_error.response_data.nil? or new_error.response_data['badRequest'].nil?
    new_error.instance_variable_set(:@validation_errors, new_error.response_data['badRequest']['validationErrors'])
  end
  new_error
end