Skip to content

Commit b6c7e2e

Browse files
committed
error handling
1 parent 305d28b commit b6c7e2e

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/services/notes.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,18 @@ function findIncludeNoteLinks(content, foundLinks) {
458458
}
459459

460460
function findRelationMapLinks(content, foundLinks) {
461-
const obj = JSON.parse(content);
461+
try {
462+
const obj = JSON.parse(content);
462463

463-
for (const note of obj.notes) {
464-
foundLinks.push({
465-
name: 'relationMapLink',
466-
value: note.noteId
467-
});
464+
for (const note of obj.notes) {
465+
foundLinks.push({
466+
name: 'relationMapLink',
467+
value: note.noteId
468+
});
469+
}
470+
}
471+
catch (e) {
472+
log.error("Could not scan for relation map links: " + e.message);
468473
}
469474
}
470475

0 commit comments

Comments
 (0)