@@ -32,25 +32,29 @@ export async function retrieveNetworkFailures(
3232 ( entry : HarEntry ) =>
3333 entry . response . status === 0 ||
3434 entry . response . status >= 400 ||
35- entry . response . _error !== undefined
35+ entry . response . _error !== undefined ,
3636 ) ;
37-
37+
3838 return failureEntries . length > 0
39- ? `Network Failures (${ failureEntries . length } found):\n${ JSON . stringify ( failureEntries . map ( ( entry : any ) => ( {
40- startedDateTime : entry . startedDateTime ,
41- request : {
42- method : entry . request ?. method ,
43- url : entry . request ?. url ,
44- queryString : entry . request ?. queryString ,
45- } ,
46- response : {
47- status : entry . response ?. status ,
48- statusText : entry . response ?. statusText ,
49- _error : entry . response ?. _error ,
50- } ,
51- serverIPAddress : entry . serverIPAddress ,
52- time : entry . time ,
53- } ) ) , null , 2 ) } `
39+ ? `Network Failures (${ failureEntries . length } found):\n${ JSON . stringify (
40+ failureEntries . map ( ( entry : any ) => ( {
41+ startedDateTime : entry . startedDateTime ,
42+ request : {
43+ method : entry . request ?. method ,
44+ url : entry . request ?. url ,
45+ queryString : entry . request ?. queryString ,
46+ } ,
47+ response : {
48+ status : entry . response ?. status ,
49+ statusText : entry . response ?. statusText ,
50+ _error : entry . response ?. _error ,
51+ } ,
52+ serverIPAddress : entry . serverIPAddress ,
53+ time : entry . time ,
54+ } ) ) ,
55+ null ,
56+ 2 ,
57+ ) } `
5458 : "No network failures found" ;
5559}
5660
0 commit comments