catching the errors actually only worked for Herschel data, this should fix it for the other missions
@@ -550,6 +550,7 @@ class ESASkyClass(BaseQuery):
cache=cache,
headers=self._get_header())
+ try:
response.raise_for_status()
file_name = ""
@@ -565,6 +566,9 @@ class ESASkyClass(BaseQuery):
fits_file.write(fits_data)
fits_file.close()
maps.append(fits.open(file_name))
+ except HTTPError as err:
+ log.error("Download failed with {}.".format(err))
+ maps.append(None)
if None in maps:
log.error("Some downloads were unsuccessful, please check "
