-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No error shown upon sails lift
when connect-redis is unable to connect to Redis
#3590
Comments
+1 |
For anyone who wants to take a pass at this, here's the spot in core where we get access to the session store instance: https://github.com/balderdashy/sails/blob/master/lib/hooks/session/index.js#L172 If I was able to dive into this right now, what I would do is probably On the other hand, if I found that the redis client was already an officially documented part of the store instance, or that there was another way to bind an error handler, awesome! I would implement connect-redis-specific error handling in that file I linked to above in the session hook within Sails core.
If anyone reading this has time to help with that, I'd appreciate it. No need to send a proposal since this isn't a change to usage-- a patch PR that links back to this issue would be perfect. If no one else in the community can get to this in the next couple of weeks, I'll look at it asap. Thanks! |
When using Redis adapter, inspects the `client` property and adds connection and error handlers. Future-proofed against changes to connect-redis, and backwards compatible with cases where the user supplies an existing Redis connection in the session config as `sails.config.session.client`. Would be nice to have tests for this, maybe using a Docker container...
See #3589
When session adapter is set to
redis
inconfig/sessions.js
andconnect-redis
is properly installed, but cannot connect to a Redis instance using the configured settings (perhaps because no Redis instance is running!) no error is displayed in the console, making it appear as if the server lifted without incident when in fact the app will be unable to handle sessions.The text was updated successfully, but these errors were encountered: