Class: Glia::Errors::InvalidNumberError

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

Returns a new instance of InvalidNumberError.



18
19
20
21
22
23
24
# File 'lib/glia/errors/client_errors.rb', line 18

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