From 131261431d7026a723a451b95a021c8ccdf1aee0 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Tue, 9 Jan 2024 12:09:42 +0800 Subject: [PATCH] add comment --- packages/rss-handler/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/rss-handler/src/index.ts b/packages/rss-handler/src/index.ts index 5ccd0510c..c280cb5c8 100644 --- a/packages/rss-handler/src/index.ts +++ b/packages/rss-handler/src/index.ts @@ -185,6 +185,8 @@ const parseFeed = async (url: string, content: string) => { } } + // return await is needed to catch errors thrown by the parser + // otherwise the error will be caught by the outer try catch return await parser.parseString(content) } catch (error) { console.log(error)