-
Notifications
You must be signed in to change notification settings - Fork 62
Improve error log message output #178
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
Conversation
5ef5641
to
fe0c3a3
Compare
Could you open this in it's own PR please? |
b353025
to
cd92dee
Compare
Looks good now but:
|
I believe in Ruby 3.2 |
Right, https://bugs.ruby-lang.org/issues/18438 is the one I vaguely remembered. But So maybe it's |
Ideally we'd just augment the message in |
cd92dee
to
835698a
Compare
Yeah, it's definitely class MyError < StandardError
def message
super.upcase
end
end
raise MyError, "test"
|
835698a
to
fa56ab3
Compare
@casperisfine Is there anything else I can do to get this merged? We're seeing some timeouts associated with |
Yeah sorry this fell through the cracks a bit. I'll a reminder to get back at it very soon. |
Previously when an error were received by a Redis server, it was not clear whether this came from a Redis Sentinel or a Redis server in the cluster. This commit adds the hostname/port of the server to the exception message via a log context. Closes redis-rb#177
310b4aa
to
c6f936c
Compare
- Don't include the db if it's `0` - Show unix sockets with `unix://` scheme
c6f936c
to
5b0e6f7
Compare
|
redis-rb#178 introduced a regression that caused a ConnectionError to be thrown to the caller if the Sentinel master or replica could not be resolved. When a ConnectionError is thrown, the error message handler would attempt to retrieve `config.server_url`, but this in turn causes another Sentinel resolution to be attempted. We avoid this by adding a `resolved?` method that will indicate whether the config can be used. The error handler won't attempt to provide more details if the config has yet to be resolved. Closes redis-rb#182
redis-rb#178 introduced a regression that caused a ConnectionError to be thrown to the caller if the Sentinel master or replica could not be resolved. When a ConnectionError is thrown, the error message handler would attempt to retrieve `config.server_url`, but this in turn causes another Sentinel resolution to be attempted. We avoid this by adding a `resolved?` method that will indicate whether the config can be used. The error handler won't attempt to provide more details if the config has yet to be resolved. Closes redis-rb#182
redis-rb#178 introduced a regression that caused a `ConnectionError` to be thrown to the caller if the Sentinel master or replica could not be resolved. When a `ConnectionError` is thrown, the error message handler would attempt to retrieve `config.server_url`, but this in turn causes another Sentinel resolution to be attempted. We avoid this by adding a `resolved?` method that will indicate whether the config can be used. The error handler won't attempt to provide more details if the config has yet to be resolved. Closes redis-rb#182
Previously when an error were received by a Redis server, it was not clear whether this came from a Redis Sentinel or a Redis server in the cluster. This commit adds the hostname/port of the server to the exception message via a log context.
Closes #177