From 0c98243ecb3eabf269ac7bc35a18882c8d26274b Mon Sep 17 00:00:00 2001 From: pedro Date: Fri, 27 Sep 2024 09:17:48 -0300 Subject: [PATCH] workbench-script: improve err msg for HTTP POST --- workbench-script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workbench-script.py b/workbench-script.py index f4b01a6..743a505 100644 --- a/workbench-script.py +++ b/workbench-script.py @@ -288,8 +288,8 @@ def send_snapshot_to_devicehub(snapshot, token, url): try: requests.post(url, data=json.dumps(snapshot), headers=headers) print(f"workbench: INFO: Snapshot sent to '{url}'") - except: - print(f"workbench: ERROR: Snapshot not remotely sent. URL '{url}' is unreachable. Do you have internet? Is your server up & running?") + except Exception as e: + print(f"workbench: ERROR: Snapshot not remotely sent. URL '{url}' is unreachable. Do you have internet? Is your server up & running?\n {e}") def load_config(config_file="settings.ini"): """