From 47a8e24850eba5605acdb046c11dfe5968b06f36 Mon Sep 17 00:00:00 2001 From: pedro Date: Thu, 10 Oct 2024 19:09:44 +0200 Subject: [PATCH] allow more response codes --- workbench-script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench-script.py b/workbench-script.py index 901781f..d7a823d 100644 --- a/workbench-script.py +++ b/workbench-script.py @@ -303,7 +303,7 @@ def send_snapshot_to_devicehub(snapshot, token, url): } try: response = requests.post(url, data=json.dumps(snapshot), headers=headers) - if response.status_code == 200: + if 200 <= response.status_code < 300: print(f"workbench: INFO: Snapshot successfully sent to '{url}'") else: txt = "workbench: ERROR: Failed to send snapshot. HTTP {}: {}".format(