Skip to content

Commit 1aa0683

Browse files
committed
Fix error handling for sentinel authantication command
1 parent 19c36ce commit 1aa0683

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/redis/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def sentinel_detect
597597
raise CannotConnectError, "No sentinels available."
598598
rescue Redis::CommandError => err
599599
# this feature is only available starting with Redis 5.0.1
600-
raise unless err.message.start_with?('ERR unknown command `auth`')
600+
raise if err.message !~ /ERR unknown command (`|')auth(`|')/
601601
@options[:password] = DEFAULTS.fetch(:password)
602602
retry
603603
end

0 commit comments

Comments
 (0)