Do not use .stack property with error objects
This commit is contained in:
parent
060b6dbacc
commit
d7c06e0a5a
8 changed files with 24 additions and 26 deletions
|
@ -103,7 +103,7 @@ module.exports.sendMail = (mail, template, callback) => {
|
|||
|
||||
module.exports.transport.sendMail(mail, (err, info) => {
|
||||
if (err) {
|
||||
log.error('Mail', err.stack);
|
||||
log.error('Mail', err);
|
||||
if (err.responseCode && err.responseCode >= 400 && err.responseCode < 500 && tryCount <= 5) {
|
||||
// temporary error, try again
|
||||
log.verbose('Mail', 'Retrying after %s sec. ...', tryCount);
|
||||
|
|
|
@ -309,7 +309,7 @@ module.exports.updateLinks = (campaign, list, subscription, serviceUrl, message,
|
|||
isAttributeValue: true
|
||||
}), campaign.id, (err, linkId, cid) => {
|
||||
if (err) {
|
||||
log.error('Link', err.stack);
|
||||
log.error('Link', err);
|
||||
return storeNext();
|
||||
}
|
||||
map.set(urlItem.value, cid);
|
||||
|
|
|
@ -245,7 +245,7 @@ module.exports.addConfirmation = (list, email, optInIp, data, callback) => {
|
|||
}
|
||||
}, err => {
|
||||
if (err) {
|
||||
log.error('Subscription', err.stack);
|
||||
log.error('Subscription', err);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -331,7 +331,7 @@ module.exports.sendReset = (username, callback) => {
|
|||
}
|
||||
}, err => {
|
||||
if (err) {
|
||||
log.error('Mail', err.stack); // eslint-disable-line no-console
|
||||
log.error('Mail', err); // eslint-disable-line no-console
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue