File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
server/src/main/java/org/elasticsearch/action Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -121,13 +121,13 @@ public void setExceptionIfUnset(ElasticsearchException exception) {
121121 : "If the local resolution result is SUCCESS, exception must be null" ;
122122 Objects .requireNonNull (exception );
123123
124- var message = "Exception is already set: " + exception .getMessage ();
125- if (this .exception != null && Objects .equals (this .exception .getMessage (), exception .getMessage ()) == false ) {
124+ if (this .exception == null ) {
125+ this .exception = exception ;
126+ } else if (Objects .equals (this .exception .getMessage (), exception .getMessage ()) == false ) {
126127 // see https://github.com/elastic/elasticsearch/issues/135799
128+ var message = "Exception is already set: " + exception .getMessage ();
127129 logger .debug (message );
128130 assert false : message ;
129- } else {
130- this .exception = exception ;
131131 }
132132 }
133133
You can’t perform that action at this time.
0 commit comments