Skip to content

Commit

Permalink
ENH: updating error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTheisen committed Nov 21, 2024
1 parent ea592de commit 12d10f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion act/discovery/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def download_arm_data(username, token, datastream, startdate, enddate, time=None
try:
response_body = urlopen(query_url).read().decode('utf-8')
except Exception as error:
print(error, ' for url: ' + query_url)
raise (error, ' for url: ' + query_url)
return
# if the response is an html doc, then there was an error with the user
if response_body[1:14] == '!DOCTYPE html':
raise ConnectionRefusedError('Error with user. Check username or token.')
Expand Down

0 comments on commit 12d10f3

Please sign in to comment.