correct error handling

This commit is contained in:
Alex Holliday committed 2025-05-09 14:53:53 -07:00
1 parent 36d78a9aa4
commit 342e67593b
1 file changed
+1 -2
+1 -2
View File
@@ -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;