From d345e66fc79362a1171670958e79651cb97086d8 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Mon, 6 Jan 2025 12:59:32 -0500 Subject: [PATCH] [Fleet] Fix getBulkAssets behavior with missing dashboard (#205619) (cherry picked from commit d00a73c5e59425cdd07689e35ae5424097530fd4) --- .../fleet/server/services/epm/packages/get_bulk_assets.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/platform/plugins/shared/fleet/server/services/epm/packages/get_bulk_assets.ts b/x-pack/platform/plugins/shared/fleet/server/services/epm/packages/get_bulk_assets.ts index ab6868dfaf65c..727d338447170 100644 --- a/x-pack/platform/plugins/shared/fleet/server/services/epm/packages/get_bulk_assets.ts +++ b/x-pack/platform/plugins/shared/fleet/server/services/epm/packages/get_bulk_assets.ts @@ -53,7 +53,10 @@ export async function getBulkAssets( const res: SimpleSOAssetType[] = resolvedObjects .map(({ saved_object: savedObject }) => savedObject) - .filter((savedObject) => displayedAssetTypesLookup.has(savedObject.type)) + .filter( + (savedObject) => + savedObject?.error?.statusCode !== 404 && displayedAssetTypesLookup.has(savedObject.type) + ) .map((obj) => { // Kibana SOs are registered with an app URL getter, so try to use that // for retrieving links to assets whenever possible