From 12d10f395d5ee3baedd8f6b653ab0f704507d9ce Mon Sep 17 00:00:00 2001 From: AdamTheisen Date: Thu, 21 Nov 2024 15:14:58 -0600 Subject: [PATCH] ENH: updating error handling --- act/discovery/arm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/act/discovery/arm.py b/act/discovery/arm.py index 25c8228e21..22a7e4d41c 100644 --- a/act/discovery/arm.py +++ b/act/discovery/arm.py @@ -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.')