Handle exception if missing video (#1787)

This commit is contained in:
Maksim Ivanov
2025-02-18 16:32:12 +01:00
committed by GitHub
parent 4df0daa2ea
commit ad7de04dc5

View File

@@ -485,6 +485,8 @@ class BrowserState:
self.browser_artifacts.video_artifacts[index].video_path = await page.video.path() self.browser_artifacts.video_artifacts[index].video_path = await page.video.path()
except asyncio.TimeoutError: except asyncio.TimeoutError:
LOG.info("Timeout to get the page video, skip the exception") 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 return
target_lenght = index + 1 target_lenght = index + 1
@@ -496,6 +498,8 @@ class BrowserState:
self.browser_artifacts.video_artifacts[index].video_path = await page.video.path() self.browser_artifacts.video_artifacts[index].video_path = await page.video.path()
except asyncio.TimeoutError: except asyncio.TimeoutError:
LOG.info("Timeout to get the page video, skip the exception") 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 return
async def get_or_create_page( async def get_or_create_page(