mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-25 06:41:36 -07:00
catch text parsing error
This commit is contained in:
parent
41c7dfe208
commit
db392efae8
1 changed files with 7 additions and 1 deletions
|
@ -92,7 +92,13 @@ export async function importPosts(
|
|||
logger.info(`Is dm, skip [${linenum}] ...`);
|
||||
continue;
|
||||
}
|
||||
const text = htmlToMfm(post.content, post.tag);
|
||||
let text;
|
||||
try {
|
||||
text = htmlToMfm(post.content, post.tag);
|
||||
} catch (e) {
|
||||
logger.warn(`Error while parsing text in line ${linenum}: ${e}`);
|
||||
continue;
|
||||
}
|
||||
logger.info(`Posting[${linenum}] ...`);
|
||||
|
||||
const note = await create(user, {
|
||||
|
|
Loading…
Reference in a new issue