Class: Glia::Errors::InvalidTypeError
- Defined in:
- lib/glia/errors/client_errors.rb
Defined Under Namespace
Classes: Types
Instance Attribute Summary
Attributes inherited from Error
#error_details, #message, #ref, #type
Instance Method Summary collapse
-
#initialize(field:, type:, message: nil) ⇒ InvalidTypeError
constructor
A new instance of InvalidTypeError.
Methods inherited from Error
Constructor Details
#initialize(field:, type:, message: nil) ⇒ InvalidTypeError
Returns a new instance of InvalidTypeError.
106 107 108 109 110 111 112 113 |
# File 'lib/glia/errors/client_errors.rb', line 106 def initialize(field:, type:, message: nil) super( type: INVALID_TYPE_ERROR, ref: create_ref(INVALID_TYPE_ERROR), message: || "#{Naming.humanize(field)} must be of type #{type}", error_details: { type: type } ) end |