diff --git a/server/controllers/monitorController.js b/server/controllers/monitorController.js index 5ab654375..9a42ea4e5 100755 --- a/server/controllers/monitorController.js +++ b/server/controllers/monitorController.js @@ -649,9 +649,8 @@ class MonitorController { sendTestEmail = async (req, res, next) => { try { const { to } = req.body; - if (!to || typeof to !== "string") { - return res.error({ msg: this.stringService.errorForValidEmailAddress }); + throw new Error(this.stringService.errorForValidEmailAddress); } const subject = this.stringService.testEmailSubject;