Return 424 for external errors

This commit is contained in:
Girish Ramakrishnan
2018-09-07 11:27:19 -07:00
parent 76f5b22c07
commit 88330ab415
5 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ function setDnsRecords(req, res, next) {
mail.setDnsRecords(req.params.domain, function (error) {
if (error && error.reason === MailError.NOT_FOUND) return next(new HttpError(404, error.message));
if (error && error.reason === MailError.EXTERNAL_ERROR) return next(new HttpError(503, error.message));
if (error && error.reason === MailError.EXTERNAL_ERROR) return next(new HttpError(424, error.message));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(201));