diff --git a/stormevents/nhc/storms.py b/stormevents/nhc/storms.py index 99c62f3..9aaeba0 100644 --- a/stormevents/nhc/storms.py +++ b/stormevents/nhc/storms.py @@ -221,6 +221,8 @@ def nhc_storms_gis_archive(year: int = None) -> pandas.DataFrame: url = 'http://www.nhc.noaa.gov/gis/archive_wsurge.php' response = requests.get(url, params={'year': year}) + if not response.ok: + response.raise_for_status() soup = BeautifulSoup(response.content, features='html.parser') table = soup.find('table')