public IActionResult GetCities(string Country) { try { Country = Country.Trim(); if (_weatherDataService.CheckCountryExist(Country)) { return(Ok(_weatherDataService.GetCityList(Country))); } else { return(NotFound(string.Format("{0} not found", Country))); } } catch { //log error return(StatusCode((int)HttpStatusCode.InternalServerError, "Server offline please try again later")); } }