fix(browser_providers): preserve tracebacks in session-close exception logs

The three managed browser providers (Browser Use, Firecrawl,
Browserbase) all log the generic `except Exception as e:` fallback
when a session-close request raises, but drop the traceback. When a
cleanup path fails in production, the log shows the error string with
no stack — which makes it hard to tell whether the SDK, the HTTP
layer, or a third-party upstream misbehaved.

Add `exc_info=True` to all three sites.
This commit is contained in:
Alexazhu 2026-04-18 15:34:29 +08:00
parent 73bccc94c7
commit ade2ea2e34
3 changed files with 3 additions and 3 deletions

View file

@ -192,7 +192,7 @@ class BrowserbaseProvider(CloudBrowserProvider):
)
return False
except Exception as e:
logger.error("Exception closing Browserbase session %s: %s", session_id, e)
logger.error("Exception closing Browserbase session %s: %s", session_id, e, exc_info=True)
return False
def emergency_cleanup(self, session_id: str) -> None: