add error trace to file download errors (#4503)

This commit is contained in:
Shuchang Zheng
2026-01-24 23:24:04 -08:00
committed by GitHub
parent 3308faae61
commit 1b7a7b9eba

View File

@@ -251,10 +251,10 @@ async def download_file(
LOG.info(f"File downloaded successfully to {file_path}")
return file_path
except aiohttp.ClientResponseError as e:
LOG.error(f"Failed to download file, status code: {e.status}")
LOG.exception(f"Failed to download file, status code: {e.status}")
raise
except DownloadFileMaxSizeExceeded as e:
LOG.error(f"Failed to download file, max size exceeded: {e.max_size}")
LOG.exception(f"Failed to download file, max size exceeded: {e.max_size}")
raise
except Exception:
LOG.exception("Failed to download file")