From 44850a6ab148c3debf0f642a81852efd31421afb Mon Sep 17 00:00:00 2001 From: Steve Larson <9larsons@gmail.com> Date: Wed, 18 Dec 2024 10:32:10 -0600 Subject: [PATCH] Change error handling on bad member uuid --- .../link-redirection/jobs/link-redirect-event/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghost/core/core/server/services/link-redirection/jobs/link-redirect-event/index.js b/ghost/core/core/server/services/link-redirection/jobs/link-redirect-event/index.js index 074c7c1866..3571b998c0 100644 --- a/ghost/core/core/server/services/link-redirection/jobs/link-redirect-event/index.js +++ b/ghost/core/core/server/services/link-redirection/jobs/link-redirect-event/index.js @@ -8,7 +8,8 @@ module.exports = async function handleRedirect(data) { const {uuid, linkId, timestamp, timezone} = data; const member = await db.knex.select('id').from('members').where('uuid', uuid).first(); if (!member) { - throw new errors.NotFoundError({message: `Member with uuid ${uuid} not found`}); + return; // throwing error causes the job to fail and be retried + // throw new errors.NotFoundError({message: `Member with uuid ${uuid} not found`}); } // const formattedTimestamp = new Date(timestamp).toISOString(); // for sqlite support try {