From 2bbf696ef4f41f3ea178e5b8477c918d47006eb4 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Wed, 22 Sep 2021 09:19:52 -0400 Subject: [PATCH] [Fleet] Handle possible unhandled promise rejection in preconfiguration service --- x-pack/plugins/fleet/server/services/preconfiguration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts index 37ed98a6f4aa0..55cdd966bcf49 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts @@ -224,7 +224,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( } // Add the is_managed flag after configuring package policies to avoid errors if (shouldAddIsManagedFlag) { - agentPolicyService.update(soClient, esClient, policy!.id, { is_managed: true }); + await agentPolicyService.update(soClient, esClient, policy!.id, { is_managed: true }); } } }