validate browser session id when running tasks or workflows (#2874)

This commit is contained in:
Shuchang Zheng
2025-07-04 01:49:51 -07:00
committed by GitHub
parent 133cee4358
commit f832206f38
3 changed files with 28 additions and 0 deletions

View File

@@ -715,3 +715,11 @@ class MissingBrowserSessionError(SkyvernHTTPException):
class MissingBrowserAddressError(SkyvernException):
def __init__(self, browser_session_id: str) -> None:
super().__init__(f"Browser session {browser_session_id} does not have an address.")
class BrowserSessionNotFound(SkyvernHTTPException):
def __init__(self, browser_session_id: str) -> None:
super().__init__(
f"Browser session {browser_session_id} does not exist or is not live.",
status_code=status.HTTP_404_NOT_FOUND,
)