diff --git a/Thermo.Active/Controllers/WebApi/ModulesController.cs b/Thermo.Active/Controllers/WebApi/ModulesController.cs index 035927cc..22927ded 100644 --- a/Thermo.Active/Controllers/WebApi/ModulesController.cs +++ b/Thermo.Active/Controllers/WebApi/ModulesController.cs @@ -13,6 +13,7 @@ using static CMS_CORE_Library.Models.DataStructures; using static Thermo.Active.Config.ServerConfig; using static Thermo.Active.Model.Constants; using Thermo.Active.Model.DTOModels.Recipe; +using Thermo.Active.Utils; namespace Thermo.Active.Controllers.WebApi { @@ -27,11 +28,17 @@ namespace Thermo.Active.Controllers.WebApi // Try connection CmsError libraryError = ncAdapter.Connect(); if (libraryError.errorCode != 0) - return NotFound(); + { + ThermoActiveLogger.LogError($"NC Not connected! | GetCurrentModules | {libraryError.exception}"); + return InternalServerError(); + } CmsError cmsError = ncAdapter.ReadModulesBlock(out Dictionary currModules); if (cmsError.IsError()) + { + ThermoActiveLogger.LogError($"GetRecipeOverview error | {cmsError.exception}"); return BadRequest(cmsError.localizationKey); + } return Ok(currModules); }