Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(routes): catch route handlers upon respective page closure #23929

Closed
wants to merge 1 commit into from

Commits on Jun 27, 2023

  1. fix(routes): catch route handlers upon respective page closure

    Currently, route handler can throw when page is closed in the middle
    of it's execution, especially with `route.fetch()` call inside.
    
    Since you cannot really control when the route hanlder is called,
    it is hard to handle this situation. However, Playwright can just
    ignore exceptions in routes after page closure. This would eliminate
    any potential issues with using Playwright APIs from the route
    handler.
    
    There is a small chance of unrelated exception being unnoticed
    in the ignored route handlers, but that seems like small price.
    dgozman committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    956d6a7 View commit details
    Browse the repository at this point in the history