Class: Glia::Errors::UnknownError

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

Returns a new instance of UnknownError.



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

def initialize(field:, message: nil)
  super(
    type: UNKNOWN_ERROR,
    ref: "https://example.com/errors/#{UNKNOWN_ERROR}.html",
    message: "#{humanize(field)} " + (message || 'validation failed with unknown error')
  )
end