Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

log the full error first

mertunsallb3681eac51c5
diff --git a/browser_use/controller/service.py b/browser_use/controller/service.py
index bbe0534ca..12822a19c 100644
--- a/browser_use/controller/service.py
+++ b/browser_use/controller/service.py
@@ -1092,6 +1092,8 @@ Provide the extracted information in a clear, structured format."""
context=context,
)
except Exception as e:
+ # Log the original exception with traceback for observability
+ logger.error(f"Action '{action_name}' failed")
# Extract clean error message from llm_error_msg tags if present
clean_msg = extract_llm_error_message(e)
result = ActionResult(error=clean_msg)