mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Change error handling on bad member uuid
This commit is contained in:
parent
f68eba14e7
commit
44850a6ab1
1 changed files with 2 additions and 1 deletions
|
@ -8,7 +8,8 @@ module.exports = async function handleRedirect(data) {
|
||||||
const {uuid, linkId, timestamp, timezone} = data;
|
const {uuid, linkId, timestamp, timezone} = data;
|
||||||
const member = await db.knex.select('id').from('members').where('uuid', uuid).first();
|
const member = await db.knex.select('id').from('members').where('uuid', uuid).first();
|
||||||
if (!member) {
|
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
|
// const formattedTimestamp = new Date(timestamp).toISOString(); // for sqlite support
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue