Exception: Supabase::Auth::Errors::AuthWeakPassword

Inherits:
CustomAuthError show all
Defined in:
lib/supabase/auth/errors.rb

Overview

Raised when a password does not meet strength requirements.

Instance Attribute Summary collapse

Attributes inherited from CustomAuthError

#name

Attributes inherited from AuthError

#code, #status

Instance Method Summary collapse

Constructor Details

#initialize(message, status: 422, reasons: []) ⇒ AuthWeakPassword

Returns a new instance of AuthWeakPassword.



91
92
93
94
# File 'lib/supabase/auth/errors.rb', line 91

def initialize(message, status: 422, reasons: [])
  super(message, name: "AuthWeakPasswordError", status: status, code: "weak_password")
  @reasons = reasons
end

Instance Attribute Details

#reasonsObject (readonly)

Returns the value of attribute reasons.



89
90
91
# File 'lib/supabase/auth/errors.rb', line 89

def reasons
  @reasons
end

Instance Method Details

#to_hObject



96
97
98
# File 'lib/supabase/auth/errors.rb', line 96

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