Exception: Supabase::Auth::Errors::CustomAuthError

Inherits:
AuthError
  • Object
show all
Defined in:
lib/supabase/auth/errors.rb

Overview

Intermediate class for custom auth errors with name and status.

Instance Attribute Summary collapse

Attributes inherited from AuthError

#code, #status

Instance Method Summary collapse

Constructor Details

#initialize(message, name:, status:, code: nil) ⇒ CustomAuthError

Returns a new instance of CustomAuthError.



42
43
44
45
# File 'lib/supabase/auth/errors.rb', line 42

def initialize(message, name:, status:, code: nil)
  super(message, status: status, code: code)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



40
41
42
# File 'lib/supabase/auth/errors.rb', line 40

def name
  @name
end

Instance Method Details

#to_hObject



47
48
49
# File 'lib/supabase/auth/errors.rb', line 47

def to_h
  { name: @name, message: message, status: @status, code: @code }
end