mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 02:05:53 +01:00
error handling
This commit is contained in:
@@ -238,7 +238,15 @@ async function findSimilarNotes(noteId) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const dateLimits = buildDateLimits(baseNote);
|
||||
let dateLimits;
|
||||
|
||||
try {
|
||||
dateLimits = buildDateLimits(baseNote);
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error(`Date limits failed with ${e.message}, entity: ${JSON.stringify(baseNote.pojo)}`);
|
||||
}
|
||||
|
||||
const rewardMap = buildRewardMap(baseNote);
|
||||
let ancestorRewardCache = {};
|
||||
const ancestorNoteIds = new Set(baseNote.ancestors.map(note => note.noteId));
|
||||
|
||||
Reference in New Issue
Block a user