Skip to content

[Bug]: Unprotected network calls in browser providers crash on connection failure #2746

@nidhi-singh02

Description

@nidhi-singh02

Description

Browser provider modules make requests.post() calls without catching requests.RequestException. Connection timeouts, DNS resolution failures, and network errors propagate as raw exceptions instead of actionable error messages.

Affected Files

File Line Call
tools/browser_providers/browser_use.py 43-48 requests.post() in create_session()
tools/browser_providers/browserbase.py 83-121 Multiple requests.post() calls with 402 retry logic

Impact

When the browser provider API is unreachable (e.g., network down, DNS failure), users see a raw requests.ConnectionError traceback instead of a clear "connection failed" message.

Fix

Wrap network calls in try/except requests.RequestException and re-raise as RuntimeError with a descriptive message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havetool/browserBrowser automation (CDP, Playwright)type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions