Skip to content

Commit 96b2e9a

Browse files
defined check
1 parent 3108b87 commit 96b2e9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/processSnapshot.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
155155
} else if (!ALLOWED_STATUSES.includes(response.status())) {
156156
ctx.log.debug(`${globalViewport} Handling request ${requestUrl}\n - skipping disallowed status [${response.status()}]`);
157157

158-
const responseHeaders = response.headers();
159-
ctx.log.debug(`Response headers for ${requestUrl}:, ${JSON.stringify(responseHeaders, null, 2)}`);
158+
if (response.headers()) {
159+
const responseHeaders = response.headers();
160+
ctx.log.debug(`Response headers for ${requestUrl}: ${JSON.stringify(responseHeaders, null, 2)}`);
161+
}
160162
let data = {
161163
statusCode: `${response.status()}`,
162164
url: requestUrl,

0 commit comments

Comments
 (0)