Skip to content

Commit 93c854d

Browse files
author
David Roberts
authored
Adjusting the location of the _cat/indices debug (#47037)
Relates #45652 The most recent failure suggests the exception is thrown earlier than previously assumed.
1 parent c5939db commit 93c854d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ public void onResponse(final GetSettingsResponse getSettingsResponse) {
126126

127127
@Override
128128
public void onFailure(final Exception e) {
129+
// Temporary logging to help debug https://github.com/elastic/elasticsearch/issues/45652
130+
// TODO: remove this when we understand why _cat/indices sometimes returns a 404
131+
if (e instanceof IndexNotFoundException) {
132+
logger.debug("_cat/indices returning index_not_found_exception", e);
133+
}
129134
listener.onFailure(e);
130135
}
131136
});
@@ -227,11 +232,6 @@ public void onResponse(final Collection<ActionResponse> responses) {
227232

228233
@Override
229234
public void onFailure(final Exception e) {
230-
// Temporary logging to help debug https://github.com/elastic/elasticsearch/issues/45652
231-
// TODO: remove this when we understand why _cat/indices sometimes returns a 404
232-
if (e instanceof IndexNotFoundException) {
233-
logger.debug("_cat/indices returning index_not_found_exception", e);
234-
}
235235
listener.onFailure(e);
236236
}
237237
}, size);

0 commit comments

Comments
 (0)