[Bugfix][Frontend] Accept successful 2xx responses for batch output uploads (#60507)

Signed-off-by: bnkaiteam <bnkaiteam@gmail.com>
Co-authored-by: Flora Feng <4florafeng@gmail.com>
This commit is contained in:
bnkaiteam
2026-10-08 02:32:35 +00:00
committed by GitHub
co-authored by Flora Feng
parent caff2b44cb
commit 3722645539
2 changed files with 24 additions and 9 deletions
+2 -2
View File
@@ -385,7 +385,7 @@ async def upload_data(output_url: str, data_or_file: str, from_file: bool) -> No
if from_file:
with open(data_or_file, "rb") as file:
async with session.put(output_url, data=file) as response:
if response.status != 200:
if not 200 <= response.status < 300:
error_text = await response.text()
raise Exception(
f"Failed to upload file.\n"
@@ -394,7 +394,7 @@ async def upload_data(output_url: str, data_or_file: str, from_file: bool) -> No
)
else:
async with session.put(output_url, data=data_or_file) as response:
if response.status != 200:
if not 200 <= response.status < 300:
error_text = await response.text()
raise Exception(
f"Failed to upload data.\n"