From 7446bf2222a03392651af6f45f735b478377bc53 Mon Sep 17 00:00:00 2001 From: suluyan Date: Mon, 20 Jul 2026 19:25:41 +0800 Subject: [PATCH] fix(docker): catch JSONDecodeError when querying Docker Hub tags Non-JSON Hub responses (block pages, 5xx HTML) would bypass URLError handling and crash json.load; surface them as RuntimeError instead. Co-authored-by: Cursor --- docker/build_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build_image.py b/docker/build_image.py index 5aaf2286..513a34b6 100644 --- a/docker/build_image.py +++ b/docker/build_image.py @@ -516,7 +516,7 @@ class AmdImageBuilder(Builder): try: with urllib.request.urlopen(req, timeout=60) as resp: payload = json.load(resp) - except urllib.error.URLError as exc: + except (urllib.error.URLError, json.JSONDecodeError) as exc: raise RuntimeError( f'Failed to query Docker Hub tags for {VLLM_ROCM_REPO}: ' f'{exc}') from exc