Skip to content

Commit 4027e1f

Browse files
committed
devin suggestion: fail on a per-node basis
1 parent 9ca0b9c commit 4027e1f

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

apps/obsidian/src/utils/syncDgNodesToSupabase.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -686,15 +686,22 @@ const syncPublishedNodesAssets = async (
686686
0,
687687
);
688688
for (const node of published) {
689-
const nodeId = node.frontmatter.nodeInstanceId as string | undefined;
690-
if (!nodeId) throw new Error("Please sync the node first");
691-
await syncPublishedNodeAssets({
692-
plugin,
693-
client,
694-
nodeId,
695-
spaceId,
696-
file: node.file,
697-
});
689+
try {
690+
const nodeId = node.frontmatter.nodeInstanceId as string | undefined;
691+
if (!nodeId) throw new Error("Please sync the node first");
692+
await syncPublishedNodeAssets({
693+
plugin,
694+
client,
695+
nodeId,
696+
spaceId,
697+
file: node.file,
698+
});
699+
} catch (error) {
700+
console.error(
701+
`Failed to sync published node assets for ${node.file.path}:`,
702+
error,
703+
);
704+
}
698705
}
699706
};
700707

0 commit comments

Comments
 (0)