diff --git a/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.ts b/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.ts index 9d4df0ced8c0b..676471d99b7d2 100644 --- a/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.ts +++ b/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.ts @@ -40,11 +40,16 @@ export const waitForIndexStatusYellow = }: WaitForIndexStatusYellowParams): TaskEither.TaskEither => () => { 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({