Skip to content

fix: surface unexpected extension API success - #188

Open
abhinavkr26104 wants to merge 1 commit into
browserbase:mainfrom
abhinavkr26104:fix/issue-180-extension-example-errors
Open

fix: surface unexpected extension API success#188
abhinavkr26104 wants to merge 1 commit into
browserbase:mainfrom
abhinavkr26104:fix/issue-180-extension-example-errors

Conversation

@abhinavkr26104

Copy link
Copy Markdown

Summary

  • verify extension cleanup through a helper that catches only APIStatusError
  • raise when retrieving or using a deleted extension unexpectedly succeeds
  • allow unrelated exceptions to propagate instead of reporting them as expected API failures
  • add regression coverage for expected failure, unexpected success, and unexpected exception paths

Why

The example previously raised AssertionError inside try blocks guarded by except Exception, so its own failure assertions were immediately swallowed and printed as successful deletion checks.

Fixes #180

Testing

  • python -m pytest tests/test_playwright_extensions.py -q (3 passed)
  • python -m mypy examples/playwright_extensions.py tests/test_playwright_extensions.py
  • python -m pyright tests/test_playwright_extensions.py
  • python -m ruff check examples/playwright_extensions.py tests/test_playwright_extensions.py
  • python -m ruff format --check examples/playwright_extensions.py tests/test_playwright_extensions.py
  • full suite: 1220 passed, 8 skipped; 4 pre-existing Windows/environment failures tracked in Make the test suite deterministic on Windows and proxied environments #181

The live Browserbase E2E path requires project credentials and was not run locally; its control flow is covered with deterministic unit tests.

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.

Extension example catches its own assertions and cannot detect failed deletion

1 participant