alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.17k stars 320 forks source link

Investigate possible race condition in puppeteer helpers' request handling #5221

Open romaricpascal opened 1 month ago

romaricpascal commented 1 month ago

What

We've been getting a couple of 'Request is already handled!' errors during our tests. Those are intermitent and seem to happen from this custom request handler not checking that the request has already been handled before trying to answer itself.

Would be good to understand if we need to add a check that the request has already been handled before doing anything, or if something else is afoot.

Why

Make our tests more robust and reduce uncertainty

Who needs to work on this

Developers

Who needs to review this

Developers

Done when