Exception: Fog::Rackspace::Errors::BadRequest

Inherits:
ServiceError show all
Defined in:
lib/fog/rackspace.rb

Instance Attribute Summary collapse

Attributes inherited from ServiceError

#response_data, #status_code

Attributes inherited from Errors::Error

#verbose

Class Method Summary collapse

Methods inherited from ServiceError

#to_s

Instance Attribute Details

#validation_errorsObject (readonly)

TODO - Need to find a better way to print out these validation errors when they are thrown



47
48
49
# File 'lib/fog/rackspace.rb', line 47

def validation_errors
  @validation_errors
end

Class Method Details

.slurp(error) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/fog/rackspace.rb', line 49

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