This repository was archived by the owner on Feb 27, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,21 +30,15 @@ export const captureResponses = (
3030
3131 const resolve = createResolvable ( )
3232
33- if ( response . mimeType === "text/html" ) {
34- client . on ( "Network.loadingFinished" , async ( params ) => {
35- if ( params . requestId !== requestId ) {
36- return
37- }
38-
39- resolve ( {
40- [ requestId ] : await extractResponseContent ( client , requestId ) ,
41- } )
42- } )
43- } else {
33+ client . on ( "Network.loadingFinished" , async ( params ) => {
34+ if ( params . requestId !== requestId ) {
35+ return
36+ }
37+
4438 resolve ( {
4539 [ requestId ] : await extractResponseContent ( client , requestId ) ,
4640 } )
47- }
41+ } )
4842 }
4943
5044 client . on ( "Network.responseReceived" , callback )
@@ -99,7 +93,6 @@ const extractResponseContent = async (
9993 responseBody . base64Encoded ? "base64" : undefined
10094 ) . toString ( )
10195 } catch ( e ) {
102- console . log ( e )
10396 // Resources (i.e. response bodies) are flushed after page commits
10497 // navigation and we are no longer able to retrieve them. In this
10598 // case, fail soft so we still add the rest of the response to the
You can’t perform that action at this time.
0 commit comments