Class: Glia::Errors::NotVerifiedError

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(resource:, message: nil) ⇒ NotVerifiedError

Returns a new instance of NotVerifiedError.



154
155
156
157
158
159
160
161
162
163
# File 'lib/glia/errors/client_errors.rb', line 154

def initialize(resource:, message: nil)
  Naming.assert_snake_case(resource)

  super(
    type: NOT_VERIFIED_ERROR,
    ref: create_ref(NOT_VERIFIED_ERROR),
    message: message || "#{Naming.humanize(resource)} is not verified",
    error_details: { resource: resource }
  )
end