Skip to content

Commit

Permalink
Add NodeMightBeDown to redis client error mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
learoyklinginsmith authored and byroot committed Nov 29, 2023
1 parent 58e43cf commit ee9edac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cluster/lib/redis/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class AmbiguousNodeError < BaseError
class TransactionConsistencyError < BaseError
end

class NodeMightBeDown < BaseError
end

def connection
raise NotImplementedError, "Redis::Cluster doesn't implement #connection"
end
Expand Down
3 changes: 2 additions & 1 deletion cluster/lib/redis/cluster/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class Client < RedisClient::Cluster
RedisClient::Cluster::OrchestrationCommandNotSupported => Redis::Cluster::OrchestrationCommandNotSupported,
RedisClient::Cluster::AmbiguousNodeError => Redis::Cluster::AmbiguousNodeError,
RedisClient::Cluster::ErrorCollection => Redis::Cluster::CommandErrorCollection,
RedisClient::Cluster::Transaction::ConsistencyError => Redis::Cluster::TransactionConsistencyError
RedisClient::Cluster::Transaction::ConsistencyError => Redis::Cluster::TransactionConsistencyError,
RedisClient::Cluster::NodeMightBeDown => Redis::Cluster::NodeMightBeDown,
).freeze

class << self
Expand Down

0 comments on commit ee9edac

Please sign in to comment.