Skip to content

Commit 1dc07ae

Browse files
gbrammerbsipocz
authored andcommitted
checking that specified request_id for ESO retrieval is valid
1 parent 4120e12 commit 1dc07ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

astroquery/eso/core.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,16 @@ def retrieve_data(self, datasets, continuation=False, destination=None,
758758
data_download_form = self._request("GET", request_url,
759759
cache=False)
760760

761+
if ('Request Handler - Error' in
762+
data_download_form.content.decode('utf-8')):
763+
# Likely a problem with the request_url
764+
msg = (f"The form at {request_url} returned an error."
765+
" See your recent requests at "
766+
"https://dataportal.eso.org/rh/requests/"
767+
f"{self.USERNAME}/recentRequests")
768+
769+
raise RemoteServiceError(msg)
770+
761771
log.info("Staging form is at {0}"
762772
.format(data_download_form.url))
763773
root = BeautifulSoup(data_download_form.content, 'html5lib')

0 commit comments

Comments
 (0)