File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -271,11 +271,15 @@ async function generateHarResponse(
271
271
272
272
const decoded = await response . body . decodedPromise ;
273
273
274
- let responseContent : { text : string , encoding ?: string } | { } ;
274
+ let responseContent : { text : string , encoding ?: string } | { comment : string } ;
275
275
try {
276
276
if ( ! decoded || decoded . byteLength > options . bodySizeLimit ) {
277
277
// If no body or the body is too large, don't include it
278
- responseContent = { } ;
278
+ responseContent = {
279
+ comment : `Body discarded during HAR generation: longer than limit of ${
280
+ options . bodySizeLimit
281
+ } bytes`
282
+ } ;
279
283
} else {
280
284
// If body decodes as text, keep it as text
281
285
responseContent = { text : UTF8Decoder . decode ( decoded ) } ;
You can’t perform that action at this time.
0 commit comments