-
Notifications
You must be signed in to change notification settings - Fork 347
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
Issue with Specific Redis Plus Plus Exceptions Not Being Caught #545
Comments
Sorry, but I cannot reproduce your problem. You can try the following code:
Since Redis does not listen on port 6378, the client receives a IO error, and it print io error: xxxxxx. It seems that you might not get any IO error. You can check the error message to see if it's really an IO error. Regards |
Thank you for the code snippet. I've tried it out, and indeed, setting the wrong port number results in an IO error as expected. I think the problem is specifically with the generic command interface for async redis. Could you please verify this? because I am still getting same issue with generic command interface. |
This has nothing to do with generic interface, and you can change the
And it shows the same result. Maybe you can show me a minimum code snippet that reproducing your problem, so that I can do some research on it. Regards |
Actually, I want to handle failover conditions and want to do retries based on specific exceptions, like if connection is lost during execution of some query or if there is some network issue then I intend to rerun that query. Specifically, if I execute a blocking query and encounter a connection closure while Redis is stopped, I anticipate a ClosedError exception. While this scenario functions correctly with synchronous Redis, I'm encountering difficulties in capturing these specific exceptions with asynchronous Redis. Code snippet to reproduce the issue:
|
Thanks for describing your scenario, and I can reproduce your problem with any blocking command, such as BLPOP. I've fixed the problem, and you can try the latest code. If you still have problem, feel free to let me know. Regards |
Close the issue, since there's no update. Regards |
Hi, I'm currently facing an issue while using async redis plus plus, specifically related to handling exceptions. I've implemented the usage of future objects to retrieve values in callbacks. However, I've encountered an unexpected behavior where specific Redis Plus Plus exceptions, such as ClosedError or IoError, are not being caught as expected. Instead, a generic Error exception is consistently thrown. Here's the code snippet:
What could be the possible reason for this behaviour?
The text was updated successfully, but these errors were encountered: