distinctify failed scrapes due to no url (#2977)

This commit is contained in:
Jonathan Dobson
2025-07-17 16:19:16 -04:00
committed by GitHub
parent 05a24026e2
commit c13c36f99e
3 changed files with 16 additions and 4 deletions

View File

@@ -264,10 +264,16 @@ class EmptyScrapePage(SkyvernException):
class ScrapingFailed(SkyvernException):
def __init__(self) -> None:
def __init__(self, *, reason: str | None = None) -> None:
self.reason = reason
super().__init__("Scraping failed.")
class ScrapingFailedNoUrl(ScrapingFailed):
def __init__(self) -> None:
super().__init__(reason="A URL is missing. Please ensure there is a URL for Skyvern to work with.")
class WorkflowRunContextNotInitialized(SkyvernException):
def __init__(self, workflow_run_id: str) -> None:
super().__init__(f"WorkflowRunContext not initialized for workflow run {workflow_run_id}")