diff --git a/src/lib/hierarchy-operations/backend.js b/src/lib/hierarchy-operations/backend.js index dd794c12..d1755fc6 100644 --- a/src/lib/hierarchy-operations/backend.js +++ b/src/lib/hierarchy-operations/backend.js @@ -84,7 +84,7 @@ const fetch = { const ancestorIdsNotFound = ancestors.rows.filter(ancestor => !ancestor.doc).map(ancestor => ancestor.key); if (ancestorIdsNotFound.length > 0) { - throw Error(`Contact '${prettyPrintDocument(contactDoc)} has parent id(s) '${ancestorIdsNotFound.join(',')}' which could not be found.`); + throw Error(`Contact '${contactDoc?.name}' (${contactDoc?._id}) has parent id(s) '${ancestorIdsNotFound.join(',')}' which could not be found.`); } return ancestors.rows.map(ancestor => ancestor.doc); diff --git a/src/lib/hierarchy-operations/lineage-manipulation.js b/src/lib/hierarchy-operations/lineage-manipulation.js index ebd7df97..8df1aa77 100644 --- a/src/lib/hierarchy-operations/lineage-manipulation.js +++ b/src/lib/hierarchy-operations/lineage-manipulation.js @@ -27,7 +27,7 @@ const replaceLineage = (doc, lineageAttributeName, replaceWith, startingFromIdIn element: doc[lineageAttributeName], attributeName: 'parent', }; - } + }; const state = initialState(); while (state.element) {