Skip to content

CAAS-2680: handle broken references - #252

Merged
nico-mcalley merged 4 commits into
masterfrom
CAAS-2680-broken-media-reference
Jul 24, 2026
Merged

CAAS-2680: handle broken references #252
nico-mcalley merged 4 commits into
masterfrom
CAAS-2680-broken-media-reference

Conversation

@nierlein-espirit

Copy link
Copy Markdown
Contributor

by returning null for entries with null identifiers

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses CAAS-2680 by making the CaaSMapper resilient to broken references coming from CaaS payloads, specifically cases where a reference identifier is null/missing, so mapping can continue without throwing.

Changes:

  • Add guards for null/missing identifiers in DatasetReference, FS_REFERENCE (Media, PageRef/GCAPage), and FS_INDEX records, logging a warning and returning null instead of throwing.
  • Add unit regression coverage to ensure broken references are skipped (mapped to null) and do not trigger reference registration, while the rest of an element still maps normally.
  • Increase an integration-test precondition timeout to reduce flakiness while waiting for CaaS propagation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/modules/CaaSMapper.ts Adds defensive checks + warnings to skip broken references instead of calling unifyId with null.
src/modules/CaaSMapper.spec.ts Adds targeted unit/regression tests covering broken-reference scenarios and ensuring mapping continues.
integrationtests/FSXAProxyApiRemoteProjects.test.ts Extends wait timeout for remote PageRef availability in CaaS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nico-mcalley
nico-mcalley merged commit ff67683 into master Jul 24, 2026
4 checks passed
@nico-mcalley
nico-mcalley deleted the CAAS-2680-broken-media-reference branch July 24, 2026 12:50
github-actions Bot added a commit that referenced this pull request Jul 24, 2026
## [11.2.2](v11.2.1...v11.2.2) (2026-07-24)

### Bug Fixes

* **CaaSMapper:** handle broken references  ([#252](#252)) ([ff67683](ff67683))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants