From 2f1d5670349e18a300884a2a4ba983c85755754e Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 6 Sep 2022 15:15:49 +0200 Subject: [PATCH] [telemetry] manage request error --- pyluos/device.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyluos/device.py b/pyluos/device.py index a548c76..379eccc 100644 --- a/pyluos/device.py +++ b/pyluos/device.py @@ -210,8 +210,10 @@ def _setup(self): "pyluos_rev": version, "routing_table":state['routing_table']} try: - requests.post("https://monorepo-services.vercel.app/api/telemetry", + r = requests.post("https://monorepo-services.vercel.app/api/telemetry", data=luos_telemetry) + if not r: + print("Telemetry request failed : error " + str(r.status_code)) except: print("Telemetry request failed.") else: