From eb355cf51dffa5a5e958a71d1a89970689c41482 Mon Sep 17 00:00:00 2001 From: Natty Date: Sat, 21 Sep 2024 21:14:34 +0200 Subject: [PATCH] Skip bad URLs in the deliver queue, and also print the URL itself --- packages/backend/src/queue/processors/deliver.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/queue/processors/deliver.ts b/packages/backend/src/queue/processors/deliver.ts index 191c148356..ac2e52b03c 100644 --- a/packages/backend/src/queue/processors/deliver.ts +++ b/packages/backend/src/queue/processors/deliver.ts @@ -20,9 +20,8 @@ export default async (job: Bull.Job) => { try { host = new URL(job.data.to).host; } catch (e) { - logger.error(`Invalid URL: ${e}`); - await job.discard(); - throw e; + logger.error(`${e} for input: ${job.data.to}`); + return "skip"; } const puny = toPuny(host);