-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Make it possible to log when an error occurs #205
Comments
@janmeier Hi, this is an interesting case. |
That was my initial though, but it seems the connection error is not being emitted (at least not in ioredis). Related issues redis/ioredis#969 and redis/ioredis#1386 While I agree in principle that we could just handle this on the redis level, there have been no maintainer responses to those issues as far as I can see :/ |
@janmeier I understand your pain. Have you considered using |
@janmeier Hi, have you found a suitable solution for this? |
Some of the errors didnot trigger redisClient.on('error', (err) => {}) in ioredis but triggered
|
We are creating a redis rate limiter, with an in-memory insurance limiter. We would like to be notified whenever a call to redis fails, so we can do something about it :)
The way I've done it for now is to subclass
RateLimiterRedis
:This works fine, but since
_handleError
is not part of the ts interface definition we won't be notified if the definition of_handleError
changes.My idea would be to either:
_handleError
(or a similar method) part of the public interface, so we can subclass is properlyonError
callback to optionserror
eventWhichever option you like most, I would be happy to implement it :)
The text was updated successfully, but these errors were encountered: