Exception: Supabase::Auth::Errors::AuthError

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

Overview

Base error class for all Supabase Auth errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, code: nil) ⇒ AuthError

Returns a new instance of AuthError.



10
11
12
13
14
# File 'lib/supabase/auth/errors.rb', line 10

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



8
9
10
# File 'lib/supabase/auth/errors.rb', line 8

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/supabase/auth/errors.rb', line 8

def status
  @status
end

Instance Method Details

#to_hObject



16
17
18
# File 'lib/supabase/auth/errors.rb', line 16

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