Class: Glia::Errors::MissingValueError

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

Returns a new instance of MissingValueError.



87
88
89
90
91
92
93
# File 'lib/glia/errors/client_errors.rb', line 87

def initialize(field:, message: nil)
  super(
    type: MISSING_VALUE_ERROR,
    ref: create_ref(MISSING_VALUE_ERROR),
    message: message || "#{humanize(field)} is missing"
  )
end