Exception: Cxf::Errors::ValidationException

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

Instance Attribute Summary collapse

Attributes inherited from ServiceError

#client, #detail, #http_status, #response, #title

Instance Method Summary collapse

Methods inherited from ServiceError

#initialize, #to_s

Constructor Details

This class inherits a constructor from Cxf::Errors::ServiceError

Instance Attribute Details

#failed_validationsObject (readonly)

Returns the value of attribute failed_validations.


103
104
105
# File 'lib/errors.rb', line 103

def failed_validations
  @failed_validations
end

Instance Method Details

#errors_hashObject


91
92
93
94
95
96
97
98
99
100
101
# File 'lib/errors.rb', line 91

def errors_hash
  {
    errors: if response.is_a? Hash
              response.keys.reduce([]) do |carry, error_key|
                carry + (response[error_key].is_a?(Array) ? response[error_key] : [response[error_key]] )
              end
            else
              response
            end
  }
end

#to_hObject


87
88
89
# File 'lib/errors.rb', line 87

def to_h
  super(errors_hash)
end