@@ -6,17 +6,13 @@ class RedisClient
66 class Cluster
77 ERR_ARG_NORMALIZATION = -> ( arg ) { Array [ arg ] . flatten . reject { |e | e . nil? || ( e . respond_to? ( :empty? ) && e . empty? ) } }
88
9- # Raised when client connected to redis as cluster mode
10- # and failed to fetch cluster state information by commands.
119 class InitialSetupError < ::RedisClient ::Error
1210 def initialize ( errors )
1311 msg = ERR_ARG_NORMALIZATION . call ( errors ) . map ( &:message ) . uniq . join ( ',' )
1412 super ( "Redis client could not fetch cluster information: #{ msg } " )
1513 end
1614 end
1715
18- # Raised when client connected to redis as cluster mode
19- # and some cluster subcommands were called.
2016 class OrchestrationCommandNotSupported < ::RedisClient ::Error
2117 def initialize ( command )
2218 str = ERR_ARG_NORMALIZATION . call ( command ) . map ( &:to_s ) . join ( ' ' ) . upcase
@@ -28,7 +24,6 @@ def initialize(command)
2824 end
2925 end
3026
31- # Raised when error occurs on any node of cluster.
3227 class ErrorCollection < ::RedisClient ::Error
3328 attr_reader :errors
3429
@@ -41,11 +36,10 @@ def initialize(errors)
4136
4237 @errors = errors
4338 messages = @errors . map { |node_key , error | "#{ node_key } : #{ error . message } " }
44- super ( "Command errors were replied on any node: #{ messages . join ( ', ' ) } " )
39+ super ( "Errors occurred on any node: #{ messages . join ( ', ' ) } " )
4540 end
4641 end
4742
48- # Raised when cluster client can't select node.
4943 class AmbiguousNodeError < ::RedisClient ::Error
5044 def initialize ( command )
5145 super ( "Cluster client doesn't know which node the #{ command } command should be sent to." )
0 commit comments