public async Task <HomeViewModel> Get(string tmpCode) { try { HomeViewModel model = new HomeViewModel(await InitPage()); var template = await _templateService.GetTemplateToCache(tmpCode); if (template == null || template.Status != EnumDefine.CommonStatusEnum.Active) { model.AddMessage(ResourceKey.Template_NotFound); model.HttpResponseCode = StatusCodes.Status404NotFound; return(model); } return(model); } catch (Exception e) { _logger.LogError(e, e.Message); throw; } }