Unverified Commit cf88b237 authored by Alvin Tang's avatar Alvin Tang Committed by GitHub
Browse files

fix: check HTTP status in batch read_file to prevent silent failures (#36397)


Signed-off-by: default avatargambletan <ethanchang32@gmail.com>
Co-authored-by: default avatargambletan <ethanchang32@gmail.com>
Co-authored-by: default avatarClaude Opus 4.6 <noreply@anthropic.com>
parent a3189a08
......@@ -320,6 +320,7 @@ class BatchProgressTracker:
async def read_file(path_or_url: str) -> str:
if path_or_url.startswith("http://") or path_or_url.startswith("https://"):
async with aiohttp.ClientSession() as session, session.get(path_or_url) as resp:
resp.raise_for_status()
return await resp.text()
else:
with open(path_or_url, encoding="utf-8") as f:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment