From 1e2a72a902dd0e8d190d0dfc4ed22281784c2cfa Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Thu, 10 Jan 2019 20:07:41 -0500 Subject: [PATCH] propigate errors on index creation fail (#28541) (#28546) --- x-pack/plugins/beats_management/index.ts | 4 ++-- x-pack/plugins/beats_management/server/kibana.index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/beats_management/index.ts b/x-pack/plugins/beats_management/index.ts index 3355bc9881811..0bb39d43db1c5 100644 --- a/x-pack/plugins/beats_management/index.ts +++ b/x-pack/plugins/beats_management/index.ts @@ -35,8 +35,8 @@ export function beats(kibana: any) { }, config: () => config, configPrefix: CONFIG_PREFIX, - init(server: KibanaLegacyServer) { - initServerWithKibana(server); + async init(server: KibanaLegacyServer) { + await initServerWithKibana(server); }, }); } diff --git a/x-pack/plugins/beats_management/server/kibana.index.ts b/x-pack/plugins/beats_management/server/kibana.index.ts index dd7bc443bc603..73a1e80e24c3b 100644 --- a/x-pack/plugins/beats_management/server/kibana.index.ts +++ b/x-pack/plugins/beats_management/server/kibana.index.ts @@ -7,7 +7,7 @@ import { compose } from './lib/compose/kibana'; import { initManagementServer } from './management_server'; -export const initServerWithKibana = (hapiServer: any) => { +export const initServerWithKibana = async (hapiServer: any) => { const libs = compose(hapiServer); - initManagementServer(libs); + await initManagementServer(libs); };