From 647410c924fd46fbf57a6176510eca5a5c6a1106 Mon Sep 17 00:00:00 2001 From: Turgut Date: Thu, 21 May 2026 16:05:14 +0200 Subject: [PATCH] fix: raise ValueError with context on malformed signed URL --- roboflow/models/inference.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roboflow/models/inference.py b/roboflow/models/inference.py index ca3f4503..b60f334d 100644 --- a/roboflow/models/inference.py +++ b/roboflow/models/inference.py @@ -228,7 +228,10 @@ def predict_video( signed_url = response.json()["signed_url"] - signed_url_expires = signed_url.split("&X-Goog-Expires")[1].split("&")[0].strip("=") + try: + signed_url_expires = signed_url.split("&X-Goog-Expires")[1].split("&")[0].strip("=") + except IndexError as e: + raise ValueError(f"Could not parse expiry from signed URL: {signed_url}") from e # make a POST request to the signed URL headers = {"Content-Type": "application/octet-stream"}