mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Co-authored-by: Rudolf Meijering <rudolf.meijering@elastic.co>
This commit is contained in:
parent
43fb6d388a
commit
0a3cce7f4f
1 changed files with 10 additions and 5 deletions
|
@ -40,11 +40,16 @@ export const waitForIndexStatusYellow =
|
|||
}: WaitForIndexStatusYellowParams): TaskEither.TaskEither<RetryableEsClientError, {}> =>
|
||||
() => {
|
||||
return client.cluster
|
||||
.health({
|
||||
index,
|
||||
wait_for_status: 'yellow',
|
||||
timeout,
|
||||
})
|
||||
.health(
|
||||
{
|
||||
index,
|
||||
wait_for_status: 'yellow',
|
||||
timeout,
|
||||
},
|
||||
// Don't reject on status code 408 so that we can handle the timeout
|
||||
// explicitly and provide more context in the error message
|
||||
{ ignore: [408] }
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.body.timed_out === true) {
|
||||
return Either.left({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue