Skip to content

Commit

Permalink
Handle exception if missing video (#1787)
Browse files Browse the repository at this point in the history
  • Loading branch information
satansdeer authored Feb 18, 2025
1 parent 4df0daa commit ad7de04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skyvern/webeye/browser_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ async def set_working_page(self, page: Page | None, index: int = 0) -> None:
self.browser_artifacts.video_artifacts[index].video_path = await page.video.path()
except asyncio.TimeoutError:
LOG.info("Timeout to get the page video, skip the exception")
except Exception:
LOG.exception("Error while getting the page video", exc_info=True)
return

target_lenght = index + 1
Expand All @@ -496,6 +498,8 @@ async def set_working_page(self, page: Page | None, index: int = 0) -> None:
self.browser_artifacts.video_artifacts[index].video_path = await page.video.path()
except asyncio.TimeoutError:
LOG.info("Timeout to get the page video, skip the exception")
except Exception:
LOG.exception("Error while getting the page video", exc_info=True)
return

async def get_or_create_page(
Expand Down

0 comments on commit ad7de04

Please # to comment.