Use BoxError in on error cases

This commit is contained in:
Girish Ramakrishnan
2019-12-05 09:54:29 -08:00
parent 4bb676fb5c
commit c07e215148
5 changed files with 15 additions and 10 deletions

View File

@@ -129,7 +129,7 @@ function checkOutboundPort25(callback) {
relay.status = false;
relay.value = `Connect to ${smtpServer} failed: ${error.message}. Check if port 25 (outbound) is blocked`;
client.destroy();
callback(error, relay);
callback(new BoxError(BoxError.NETWORK_ERROR, `Connect to ${smtpServer} failed.`), relay);
});
}