diff --git a/.changeset/tricky-donkeys-wink.md b/.changeset/tricky-donkeys-wink.md index 37e5a8c5cb..2d2f610dbf 100644 --- a/.changeset/tricky-donkeys-wink.md +++ b/.changeset/tricky-donkeys-wink.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-backend': patch --- -Stop failing on stitching when the entity contains deeply nested properties or long keys. +Do not fail on stitching when the entity contains `null` values associated to deeply nested or long keys. diff --git a/plugins/catalog-backend/src/database/operations/stitcher/buildEntitySearch.ts b/plugins/catalog-backend/src/database/operations/stitcher/buildEntitySearch.ts index 75962ce2fb..53e8d4c1cd 100644 --- a/plugins/catalog-backend/src/database/operations/stitcher/buildEntitySearch.ts +++ b/plugins/catalog-backend/src/database/operations/stitcher/buildEntitySearch.ts @@ -133,7 +133,7 @@ export function mapToRows(input: Kv[], entityId: string): DbSearchRow[] { for (const { key: rawKey, value: rawValue } of input) { const key = rawKey.toLocaleLowerCase('en-US'); - if (MAX_KEY_LENGTH < key.length) { + if (key.length > MAX_KEY_LENGTH) { continue; } if (rawValue === undefined || rawValue === null) {