validate browser session id when running tasks or workflows (#2874)
Some checks failed
Run tests and pre-commit / Frontend Lint and Build (push) Has been cancelled
Publish Fern Docs / run (push) Has been cancelled
Run tests and pre-commit / Run tests and pre-commit hooks (push) Has been cancelled

This commit is contained in:
Shuchang Zheng 2025-07-04 01:49:51 -07:00 committed by GitHub
parent 133cee4358
commit f832206f38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,
)