catch errors

This commit is contained in:
cutestnekoaqua 2023-03-29 21:15:06 +02:00
parent 21c7f93d7a
commit 66429527ca
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 32 additions and 27 deletions

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) {