Exception: Supabase::Rails::ConfigError
- Inherits:
-
StandardError
- Object
- StandardError
- Supabase::Rails::ConfigError
- Defined in:
- lib/supabase/rails/errors.rb
Constant Summary collapse
- CONFIG_GENERIC_ERROR =
"CONFIG_ERROR"- INVALID_MODE =
"INVALID_MODE"- API_MODE_COOKIE_UNSUPPORTED =
"API_MODE_COOKIE_UNSUPPORTED"
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message, code = CONFIG_GENERIC_ERROR) ⇒ ConfigError
constructor
A new instance of ConfigError.
Constructor Details
#initialize(message, code = CONFIG_GENERIC_ERROR) ⇒ ConfigError
Returns a new instance of ConfigError.
61 62 63 64 |
# File 'lib/supabase/rails/errors.rb', line 61 def initialize(, code = CONFIG_GENERIC_ERROR) super() @code = code 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 |
Class Method Details
.api_mode_cookie_unsupported ⇒ Object
73 74 75 76 77 78 79 |
# File 'lib/supabase/rails/errors.rb', line 73 def self. new( "`start_new_session_for` is not supported in :api mode. Cookies don't apply " \ "to JWT-bearer flows — clients send the `Authorization: Bearer` header instead.", API_MODE_COOKIE_UNSUPPORTED ) end |
.invalid_mode(value) ⇒ Object
66 67 68 69 70 71 |
# File 'lib/supabase/rails/errors.rb', line 66 def self.invalid_mode(value) new( %(Invalid `config.supabase.mode = #{value.inspect}`. Must be :api or :web.), INVALID_MODE ) end |