From 0141e808249dff5e17ca88135b4618e1b12d997a Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 23 Jul 2020 23:56:36 +0000 Subject: [PATCH] --- .../Controllers/GlobalOpsNotificationSettingsController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/AyaNova/Controllers/GlobalOpsNotificationSettingsController.cs b/server/AyaNova/Controllers/GlobalOpsNotificationSettingsController.cs index 84fe71a5..bd057bf2 100644 --- a/server/AyaNova/Controllers/GlobalOpsNotificationSettingsController.cs +++ b/server/AyaNova/Controllers/GlobalOpsNotificationSettingsController.cs @@ -100,6 +100,9 @@ namespace AyaNova.Api.Controllers if (!Authorized.HasModifyRole(HttpContext.Items, AyaType.OpsNotificationSettings))//technically maybe this could be wider open, but for now keeping as locked down return StatusCode(403, new ApiNotAuthorizedResponse()); var res = await CoreJobNotify.TestSMTPDelivery(toAddress); + if(res!="ok"){ + return StatusCode(500, new ApiErrorResponse(ApiErrorCode.API_SERVER_ERROR, null, res)); + } return Ok(ApiOkResponse.Response(res)); }