Class: Fog::Proxmox::Errors::BadRequest

Inherits:
ServiceError
  • Object
show all
Defined in:
lib/fog/proxmox/errors.rb

Overview

class BadRequest error

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


49
50
51
# File 'lib/fog/proxmox/errors.rb', line 49

def validation_errors
  @validation_errors
end

Class Method Details

.slurp(error) ⇒ Object


51
52
53
54
55
56
57
# File 'lib/fog/proxmox/errors.rb', line 51

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