mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
parent
d558a2a29a
commit
a3574c281c
1 changed files with 3 additions and 6 deletions
|
@ -412,12 +412,9 @@ export const reindexServiceFactory = (
|
|||
const { count } = await callCluster('count', { index: reindexOp.attributes.indexName });
|
||||
|
||||
if (taskResponse.task.status.created < count) {
|
||||
if (taskResponse.response.failures && taskResponse.response.failures.length > 0) {
|
||||
const failureExample = JSON.stringify(taskResponse.response.failures[0]);
|
||||
throw Boom.badData(`Reindexing failed with failures like: ${failureExample}`);
|
||||
} else {
|
||||
throw Boom.badData('Reindexing failed due to new documents created in original index.');
|
||||
}
|
||||
// Include the entire task result in the error message. This should be guaranteed
|
||||
// to be JSON-serializable since it just came back from Elasticsearch.
|
||||
throw Boom.badData(`Reindexing failed: ${JSON.stringify(taskResponse)}`);
|
||||
}
|
||||
|
||||
// Update the status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue