catch errors

This commit is contained in:
cutestnekoaqua 2023-03-29 21:15:06 +02:00
parent d640af9714
commit da322a086b

View file

@ -80,6 +80,7 @@ export async function importPosts(
}
} else {
for (const post of parsed.orderedItems) {
try {
linenum++;
if (post.inReplyTo != null) {
logger.info(`Is reply, skip [${linenum}] ...`);
@ -108,6 +109,10 @@ export async function importPosts(
apHashtags: undefined,
apEmojis: undefined,
});
} catch (e) {
logger.warn(`Error in line:${linenum} ${e}`);
}
}
}
} catch (e) {