mirror of
https://github.com/wassname/talk.git
synced 2026-07-04 15:58:38 +08:00
Merge pull request #2326 from Sentynel/master
Don't crash on email address lookup failure
This commit is contained in:
+6
-1
@@ -111,7 +111,12 @@ const processJob = transport => async ({ id, data }, done) => {
|
||||
const { message } = data;
|
||||
|
||||
// Get the email address from the job data.
|
||||
message.to = await getEmailAddress(data);
|
||||
try {
|
||||
message.to = await getEmailAddress(data);
|
||||
} catch (err) {
|
||||
logger.error({ err }, 'Failed to get user email address to send mail');
|
||||
return done(err);
|
||||
}
|
||||
|
||||
const log = logger.child({ jobID: id });
|
||||
log.info('Starting to send mail');
|
||||
|
||||
Reference in New Issue
Block a user