When cdp url is set, but browser type is not set throw a 400
Merged
TK
7mo ago+53+53+01234567890123456789-1-1-0123456789
why
Currently, if a cdp url is set, but browser.type is not set to local a session is created on api
what changed
We now warn people that they need to set the browser.type to local to properly use their own custom cdp url
test plan
tested locally with http requests + from go client + added tests
Summary by cubic
Return 400 on POST /v1/sessions/start when browser.cdpUrl is provided but browser.type is not "local", preventing unintended session creation and guiding correct local CDP usage.
- Bug Fixes
- Reject requests with
cdpUrlwhenbrowser.typeis missing or not "local"; respond 400 with a clear message to setbrowser.typeto "local". - Keep local validation: when
browser.typeis "local", requirecdpUrlorlaunchOptions. - Add integration tests for missing type and
type="browserbase"withcdpUrl.
- Reject requests with