Class: Glia::Errors::InvalidLengthError

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

Constant Summary

Constants inherited from Error

Error::SNAKE_CASE_REGEX

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) ⇒ InvalidLengthError

Returns a new instance of InvalidLengthError.



38
39
40
41
42
43
44
# File 'lib/glia/errors/client_errors.rb', line 38

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