Skip to content

fix: type browser pool acquire timeout as null - #207

Closed
Sayan- wants to merge 2 commits into
nextfrom
hypeship/fix-pool-acquire-204
Closed

Sayan- wants to merge 2 commits into
nextfrom
hypeship/fix-pool-acquire-204

Conversation

@Sayan-

@Sayan- Sayan- commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Type browserPools.acquire() as returning a browser or null. The SDK already parses HTTP 204 as null; the return type now reflects that long-poll outcome without changing API behavior or adding automatic retries.

Validation

Added mock response tests for 200, 204, and 404, including a check that 204 does not trigger an automatic retry. All 3 focused tests passed, and TypeScript type checking passed.

The change was not exercised against a live pool.

The SDK's separate 60-second request timeout can still expire before a longer API poll reaches 204.

Generation and release

This custom SDK change targets next, the branch used for the versioned release PR. After that release reaches main, production changes must back-sync to SDK staging and the next stlc build must preserve this behavior. Merge the resulting custom-code tracking PR in the API configuration repo before relying on a later generation. The API's existing OpenAPI contract already documents the 200, 204, and 404 outcomes.


Note

Low Risk
Type-only alignment with existing 204→null parsing plus tests; callers may need explicit null checks at compile time.

Overview
Updates the TypeScript return type of browserPools.acquire() to BrowserPoolAcquireResponse | null, matching existing runtime behavior where a long-poll HTTP 204 (no browser available within the wait window) is already parsed as null. No request/retry logic changes.

Adds focused API tests for 200 (session payload), 204 (null and a single fetch call), and 404 (NotFoundError).

Reviewed by Cursor Bugbot for commit 531b974. Bugbot is set up for automated code reviews on this repo. Configure here.

@Sayan-
Sayan- marked this pull request as ready for review October 9, 2026 23:29
@Sayan-
Sayan- force-pushed the hypeship/fix-pool-acquire-204 branch from ed5726b to 531b974 Compare October 10, 2026 00:00
@Sayan-
Sayan- changed the base branch from main to next October 10, 2026 00:00
@Sayan- Sayan- closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant