add exeception

This commit is contained in:
2025-01-27 00:34:28 +09:00
parent b5d2df6b2f
commit 94c892c4a7

View File

@@ -193,9 +193,11 @@ async def get_file_content(file: str) -> str | None:
async with session.get(url) as response:
response.raise_for_status()
return await response.text()
except Exception as e:
print(f"Failed to get file content: {e}")
return None
except aiohttp.ClientError as e: # More specific exception handling
print(f"Network error fetching {file}: {e}")
except asyncio.TimeoutError:
print(f"Timeout fetching {file}")
return None
async def analyze_full_context(