Mark request as handled inside response interceptor
Mark request as handled inside response interceptor
At a glance
The community member is trying to close a page and move to the next request as soon as they have the data they need, which is available in the response to a specific request that occurs before the page is loaded. They tried to do this using preNavigationHooks, but encountered errors: "Navigation failed because browser has disconnected!" when they tried to close the page, and "requestHandler timed out after 130 seconds" when they removed the await page.close(); line.
A comment suggests the community member should try putting return in the handler or leaving it empty, but there is no explicitly marked answer.
All the data I need is on the response to an specific request, which occurs before the page is loaded. What I'm trying to achieve is to close the page and go to the next request as soon as I got what I need, so I tried doing it on preNavigationHooks: