mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
catch JSON stringify error, #4310
This commit is contained in:
@@ -151,9 +151,14 @@ async function pullChanges(syncContext) {
|
||||
if (entityChanges.length === 0) {
|
||||
break;
|
||||
} else {
|
||||
const sizeInKb = Math.round(JSON.stringify(resp).length / 1024);
|
||||
try { // https://github.com/zadam/trilium/issues/4310
|
||||
const sizeInKb = Math.round(JSON.stringify(resp).length / 1024);
|
||||
|
||||
log.info(`Sync ${logMarkerId}: Pulled ${entityChanges.length} changes in ${sizeInKb} KB, starting at entityChangeId=${lastSyncedPull} in ${pulledDate - startDate}ms and applied them in ${Date.now() - pulledDate}ms, ${outstandingPullCount} outstanding pulls`);
|
||||
log.info(`Sync ${logMarkerId}: Pulled ${entityChanges.length} changes in ${sizeInKb} KB, starting at entityChangeId=${lastSyncedPull} in ${pulledDate - startDate}ms and applied them in ${Date.now() - pulledDate}ms, ${outstandingPullCount} outstanding pulls`);
|
||||
}
|
||||
catch (e) {
|
||||
log.error(`Error occurred ${e.message} ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user