Class: Glia::Errors::UnknownError

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

Returns a new instance of UnknownError.



97
98
99
100
101
102
103
# File 'lib/glia/errors/client_errors.rb', line 97

def initialize(field:, message: nil)
  super(
    type: UNKNOWN_ERROR,
    ref: create_ref(UNKNOWN_ERROR),
    message: message || "#{humanize(field)} validation failed with unknown error"
  )
end