Class: Glia::Errors::InvalidLengthError

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

Returns a new instance of InvalidLengthError.



44
45
46
47
48
49
50
# File 'lib/glia/errors/client_errors.rb', line 44

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