Exception: ApiRegulator::InvalidParams

Inherits:
ValidationError show all
Defined in:
lib/api_regulator/validation_error.rb

Instance Attribute Summary collapse

Attributes inherited from ValidationError

#details

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ InvalidParams

Returns a new instance of InvalidParams.



20
21
22
23
24
# File 'lib/api_regulator/validation_error.rb', line 20

def initialize(errors)
  @errors = errors
  @details = errors.messages
  super("Validation failed with errors, see details")
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



18
19
20
# File 'lib/api_regulator/validation_error.rb', line 18

def errors
  @errors
end