public async Task <IHttpActionResult> GetCountries() { try { var countries = await _weatherDataService.GetCountriesAsync(); return(Ok(countries)); } catch { return(InternalServerError(new Exception("Error occurred while fetching countries."))); } }
public async Task <IHttpActionResult> GetCountries() { try { var countries = await _weatherDataService.GetCountriesAsync(); return(Ok(countries)); } catch { return(InternalServerError(new Exception("Error occurred while fetching countries."))); } }