From 376288a986e47c58c17e6135b1ab5c9e858c228d Mon Sep 17 00:00:00 2001 From: Wan Qi Chen <495709+wa0x6e@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:54:54 +0700 Subject: [PATCH] fix: ignore fetch error from test endpoint --- src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index d809020..93a21e9 100644 --- a/src/api.ts +++ b/src/api.ts @@ -20,7 +20,7 @@ router.get('/test', async (req, res) => { return res.json({ url, success: true }); } catch (e: any) { - if (e.code !== 'ERR_INVALID_URL') { + if (e.code !== 'ERR_INVALID_URL' && e.name !== 'FetchError') { capture(e); }