Skip to content

Commit

Permalink
fix: prevent log pollution from common DNS/socket issues
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Feb 27, 2025
1 parent 5579386 commit 343b4ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helpers/get-transporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const mxConnect = require('mx-connect');
const nodemailer = require('nodemailer');
const pify = require('pify');

const isRetryableError = require('./is-retryable-error');
const isSSLError = require('./is-ssl-error');
const isSocketError = require('./is-socket-error');
const isTLSError = require('./is-tls-error');
Expand Down Expand Up @@ -180,7 +181,8 @@ async function getTransporter(options = {}, err) {
const [host] = await resolver.resolve(mx.host);
if (isIP(host)) mx.host = host;
} catch (err) {
logger.error(err);
// NOTE: these are mostly ETIMEDOUT
if (!isRetryableError(err)) logger.error(err);
}
}

Expand Down

0 comments on commit 343b4ce

Please sign in to comment.