Class: Fog::Rackspace::Errors::BadRequest
- Inherits:
-
ServiceError
- Object
- Errors::Error
- ServiceError
- Fog::Rackspace::Errors::BadRequest
- Defined in:
- lib/fog/rackspace/core.rb
Direct Known Subclasses
Compute::Rackspace::BadRequest, Compute::RackspaceV2::BadRequest, DNS::Rackspace::BadRequest, AutoScale::BadRequest, BlockStorage::BadRequest, CDNV2::BadRequest, Databases::BadRequest, LoadBalancers::BadRequest, Monitoring::BadRequest, Networking::BadRequest, NetworkingV2::BadRequest, Orchestration::BadRequest, Queues::BadRequest, Queues::MethodNotAllowed, Storage::Rackspace::BadRequest
Instance Attribute Summary collapse
-
#validation_errors ⇒ Object
readonly
Returns the value of attribute validation_errors.
Attributes inherited from ServiceError
#response_data, #status_code, #transaction_id
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ServiceError
extract_message, #set_transaction_id
Instance Attribute Details
#validation_errors ⇒ Object (readonly)
Returns the value of attribute validation_errors.
68 69 70 |
# File 'lib/fog/rackspace/core.rb', line 68 def validation_errors @validation_errors end |
Class Method Details
.slurp(error, service = nil) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/fog/rackspace/core.rb', line 74 def self.slurp(error, service=nil) 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 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 |
Instance Method Details
#to_s ⇒ Object
70 71 72 |
# File 'lib/fog/rackspace/core.rb', line 70 def to_s "#{super} - #{validation_errors}" end |