Class: Glia::Errors::InvalidValueError

Inherits:
Error
  • Object
show all
Defined in:
lib/glia/errors/client_errors.rb

Instance Attribute Summary

Attributes inherited from Error

#error_details, #message, #ref, #type

Instance Method Summary collapse

Methods inherited from Error

#to_h

Constructor Details

#initialize(field:, message: nil) ⇒ InvalidValueError

Returns a new instance of InvalidValueError.



34
35
36
37
38
39
40
# File 'lib/glia/errors/client_errors.rb', line 34

def initialize(field:, message: nil)
  super(
    type: INVALID_VALUE_ERROR,
    ref: create_ref(INVALID_VALUE_ERROR),
    message: message || "#{Naming.humanize(field)} value is invalid"
  )
end