Skip to content

Commit 07688c0

Browse files
author
KJ Tsanaktsidis
committed
Fix error identification middleware calling into the wrong super
I hbad thought that because the body of `call` and `call_super` are identical, it would be OK to just alias them. However, that means they both call into the `call` super, and never the `call_pipelined` super, as it turns out, which is wrong.
1 parent ae826f5 commit 07688c0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/redis_client/cluster/error_identification.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ def call(_command, config)
2929
identify_error(e, config)
3030
raise
3131
end
32-
alias call_pipelined call
32+
33+
def call_pipelined
34+
super
35+
rescue RedisClient::Error => e
36+
identify_error(e, config)
37+
raise
38+
end
3339

3440
private
3541

0 commit comments

Comments
 (0)