get_persistent_browser_session_by_runnable_id returns None instead of raising error when no record is found (#2355)

This commit is contained in:
Shuchang Zheng
2025-05-15 12:50:34 -07:00
committed by GitHub
parent 9424324baa
commit fb5ccc4016

View File

@@ -2693,7 +2693,7 @@ class AgentDB:
persistent_browser_session = (await session.scalars(query)).first()
if persistent_browser_session:
return PersistentBrowserSession.model_validate(persistent_browser_session)
raise NotFoundError(f"PersistentBrowserSession {runnable_id} not found")
return None
except NotFoundError:
LOG.error("NotFoundError", exc_info=True)
raise