File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,16 @@ def self.with_errors(errors)
4343 if !errors . is_a? ( Hash ) || errors . empty?
4444 new ( errors . to_s ) . with_errors ( EMPTY_HASH )
4545 else
46- messages = errors . map { |node_key , error | "#{ node_key } : (#{ error . class } ) #{ error . message } " }
46+ messages = errors . map { |node_key , error | "#{ node_key } : (#{ error . class } ) #{ error . message } " } . freeze
4747 new ( messages . join ( ', ' ) ) . with_errors ( errors )
4848 end
4949 end
5050
51+ def initialize ( error_message = nil )
52+ @errors = nil
53+ super
54+ end
55+
5156 def with_errors ( errors )
5257 @errors = errors if @errors . nil?
5358 self
@@ -61,7 +66,7 @@ def self.from_command(command)
6166 end
6267
6368 class NodeMightBeDown < Error
64- def initialize ( _ = '' )
69+ def initialize ( _error_message = nil )
6570 super (
6671 'The client is trying to fetch the latest cluster state ' \
6772 'because a subset of nodes might be down. ' \
You can’t perform that action at this time.
0 commit comments