@contentful/experiences-core 1.8.2-dev-20240625T1857-ee5ef2b.0 → 1.8.2-dev-20240626T0748-e45a193.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3079,27 +3079,29 @@ function gatherAutoFetchedReferentsFromIncludes(deepReferences, entriesResponse)
3079
3079
  for (const reference of deepReferences) {
3080
3080
  const headEntry = entriesResponse.items.find((entry) => entry.sys.id === reference.headEntityId);
3081
3081
  if (!headEntry) {
3082
- throw new Error(`LogicError: When resolving deep-references could not find headEntry (id=${reference.entityId})`);
3082
+ console.debug(`[experiences-sdk-core::fetchers] When resolving deep-references could not find headEntry with id '${reference.entityId}'`);
3083
+ continue;
3083
3084
  }
3084
3085
  const linkToReferent = headEntry.fields[reference.field];
3085
3086
  if (undefined === linkToReferent) {
3086
- console.debug(`[experiences-sdk-react::gatherAutoFetchedReferentsFromIncludes] Empty reference in headEntity. Probably reference is simply not set.`);
3087
+ console.debug(`[experiences-sdk-core::fetchers] Empty reference in headEntity. Probably reference is simply not set.`);
3087
3088
  continue;
3088
3089
  }
3089
3090
  if (!isLink(linkToReferent)) {
3090
- console.debug(`[experiences-sdk-react::gatherAutoFetchedReferentsFromIncludes] Non-link value in headEntity. Probably broken path '${reference.originalPath}'`);
3091
+ console.debug(`[experiences-sdk-core::fetchers] Non-link value in headEntity. Probably broken path '${reference.originalPath}'`);
3091
3092
  continue;
3092
3093
  }
3093
3094
  const linkType = linkToReferent.sys.linkType;
3094
3095
  if (!['Entry', 'Asset'].includes(linkType)) {
3095
- console.debug(`[experiences-sdk-react::gatherAutoFetchedReferentsFromIncludes] Unhandled linkType :${JSON.stringify(linkToReferent)}`);
3096
+ console.debug(`[experiences-sdk-core::fetchers] Unhandled linkType :${JSON.stringify(linkToReferent)}`);
3096
3097
  continue;
3097
3098
  }
3098
3099
  const referentEntity = entriesResponse.includes?.[linkType]?.find((entity) => entity.sys.id === linkToReferent.sys.id);
3099
3100
  if (!referentEntity) {
3100
- throw new Error(`Logic Error: L2-referent ${linkType} was not found within .includes (${JSON.stringify({
3101
+ console.debug(`[experiences-sdk-core::fetchers] L2-referent ${linkType} was not found within .includes (${JSON.stringify({
3101
3102
  linkToReferent,
3102
3103
  })})`);
3104
+ continue;
3103
3105
  }
3104
3106
  linkType === 'Entry'
3105
3107
  ? autoFetchedReferentEntries.push(referentEntity)