do not raise TargetClosedError in task cleanup when target has been closed
better error handling: make sure browser clean up won't raise error that breaks other cleanup progress (like artifact upload)
[!IMPORTANT]
Improve error handling in task cleanup by logging and handling exceptions without raising TargetClosedError in agent.py, browser_factory.py, and browser_manager.py.
Error Handling:
In agent.py, cleanup_browser_and_create_artifacts() now includes a note to handle exceptions gracefully without raising them.
In browser_factory.py, close() method now logs and handles exceptions during browser context and Playwright closure.
In browser_manager.py, cleanup_for_task() and cleanup_for_workflow_run() now log errors instead of raising them during cleanup.
This description was created by for e44f363ec22c17fb826f3fae6284c324d49c1205. It will automatically update as commits are pushed.