[Fleet] Fix getBulkAssets behavior with missing dashboard (#205619)

This commit is contained in:
Nicolas Chaulet 2025-01-06 12:59:32 -05:00 committed by GitHub
parent d16bc940b1
commit d00a73c5e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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