0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 22:34:01 -05:00

Change error handling on bad member uuid

This commit is contained in:
Steve Larson 2024-12-18 10:32:10 -06:00
parent f68eba14e7
commit 44850a6ab1

View file

@ -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 {