setup: show failure on any HTTP error (#39324)

This commit is contained in:
Adeeb Shihadeh
2026-11-28 11:58:36 -06:00
committed by firestar5683
parent ba86189d0c
commit 6227bd7b2a
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -563,6 +563,8 @@ class Setup(Widget):
except urllib.error.HTTPError as e:
if e.code == 409:
self._download_failed_reason = "Incompatible openpilot version."
else:
self._download_failed_reason = f"Server error ({e.code}): " + self.download_url.replace("https://", "", 1)
except Exception:
self._download_failed_reason = "Invalid URL: " + self.download_url.replace("https://", "", 1)
+2
View File
@@ -408,6 +408,8 @@ class Setup(Widget):
if e.code == 409:
error_msg = e.read().decode("utf-8")
self.download_failed(self.download_url, error_msg)
else:
self.download_failed(self.download_url, f"Server error ({e.code}).")
except Exception:
error_msg = "Ensure the entered URL is valid, and the device's internet connection is good."
self.download_failed(self.download_url, error_msg)