Skip to content

Automate browser based workflows with AI

add error trace to file download errors (#4503)

Shuchang Zheng1b7a7b9ebab2
diff --git a/skyvern/forge/sdk/api/files.py b/skyvern/forge/sdk/api/files.py
index 67768e885..d1f85f6c4 100644
--- a/skyvern/forge/sdk/api/files.py
+++ b/skyvern/forge/sdk/api/files.py
@@ -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")