Exception: Fog::Rackspace::Monitoring::BadRequest

Inherits:
Errors::BadRequest show all
Defined in:
lib/fog/rackspace/monitoring.rb

Instance Attribute Summary collapse

Attributes inherited from Errors::ServiceError

#response_data, #status_code, #transaction_id

Attributes inherited from Errors::Error

#verbose

Class Method Summary collapse

Methods inherited from Errors::BadRequest

#to_s

Methods inherited from Errors::ServiceError

extract_message, #set_transaction_id, #to_s

Instance Attribute Details

#validation_errorsObject (readonly)

Returns the value of attribute validation_errors.



20
21
22
# File 'lib/fog/rackspace/monitoring.rb', line 20

def validation_errors
  @validation_errors
end

Class Method Details

.slurp(error, service = nil) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/fog/rackspace/monitoring.rb', line 22

def self.slurp(error, service=nil)
  new_error = super(error)
  if  new_error.response_data && new_error.response_data['details']
    new_error.instance_variable_set(:@validation_errors, new_error.response_data['details'])
  end

  status_code = error.response ? error.response.status : nil
  new_error.instance_variable_set(:@status_code, status_code)
  new_error.set_transaction_id(error, service)
  new_error
end