Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Refactor error handling in ActionResult
Magnus Müllerc53cc4d2d191
diff --git a/browser_use/controller/service.py b/browser_use/controller/service.pyindex 919b61b60..5bb1aba37 100644--- a/browser_use/controller/service.py+++ b/browser_use/controller/service.py@@ -142,9 +142,7 @@ class Controller(Generic[Context]):):site_unavailable_msg = f'Site unavailable: {params.url} - {error_msg}'logger.warning(site_unavailable_msg)- return ActionResult(- success=False, error=site_unavailable_msg, include_in_memory=True, long_term_memory=site_unavailable_msg- )+ return ActionResult(error=site_unavailable_msg, include_in_memory=True, long_term_memory=site_unavailable_msg)else:# Re-raise non-network errors (including URLNotAllowedError for unauthorized domains)raise