public void TestConnection() { try { _executionLogService.Log("Connecting to Shopify..."); _orderApi.RetrieveCount(); _stateRepository.UpdateSystemState(x => x.ShopifyConnState, StateCode.Ok); } catch (Exception ex) { _logger.Error(ex); _stateRepository.UpdateSystemState(x => x.ShopifyConnState, StateCode.SystemFault); } }