Exception: Supabase::Rails::AuthError
- Inherits:
-
StandardError
- Object
- StandardError
- Supabase::Rails::AuthError
- Defined in:
- lib/supabase/rails/errors.rb
Constant Summary collapse
- AUTH_GENERIC_ERROR =
"AUTH_ERROR"- INVALID_CREDENTIALS =
"INVALID_CREDENTIALS"- CREATE_SUPABASE_CLIENT_ERROR =
"CREATE_SUPABASE_CLIENT_ERROR"
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message, code = AUTH_GENERIC_ERROR, status = 401) ⇒ AuthError
constructor
A new instance of AuthError.
Constructor Details
#initialize(message, code = AUTH_GENERIC_ERROR, status = 401) ⇒ AuthError
Returns a new instance of AuthError.
61 62 63 64 65 |
# File 'lib/supabase/rails/errors.rb', line 61 def initialize(, code = AUTH_GENERIC_ERROR, status = 401) super() @code = code @status = status end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
59 60 61 |
# File 'lib/supabase/rails/errors.rb', line 59 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
59 60 61 |
# File 'lib/supabase/rails/errors.rb', line 59 def status @status end |
Class Method Details
.create_supabase_client_error ⇒ Object
71 72 73 |
# File 'lib/supabase/rails/errors.rb', line 71 def self.create_supabase_client_error new("Failed to create Supabase client", CREATE_SUPABASE_CLIENT_ERROR, 500) end |
.invalid_credentials ⇒ Object
67 68 69 |
# File 'lib/supabase/rails/errors.rb', line 67 def self.invalid_credentials new("Invalid credentials", INVALID_CREDENTIALS, 401) end |