diff --git a/quartz_solar_forecast/weather/open_meteo.py b/quartz_solar_forecast/weather/open_meteo.py index f5082440..cc6b44f4 100644 --- a/quartz_solar_forecast/weather/open_meteo.py +++ b/quartz_solar_forecast/weather/open_meteo.py @@ -149,7 +149,11 @@ def get_hourly_weather( "terrestrial_radiation", ] url = self._build_url(latitude, longitude, start_date, end_date, variables) - response = requests.get(url) + try: + response = requests.get(url) + except requests.exceptions.Timeout: + + raise TimeoutError(f"Request to OpenMeteo API timed out. URl - {url}") data = response.json()["hourly"] df = pd.DataFrame(data)