Skip to content

Commit

Permalink
resourceType lowercase fix: (#483)
Browse files Browse the repository at this point in the history
follow up to #481, check reqresp.resourceType with lowercase value just
set message based on resourceType value
  • Loading branch information
ikreymer committed Mar 5, 2024
1 parent 63cedbc commit 65133c9
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/util/recorder.ts
Expand Up @@ -635,20 +635,13 @@ export class Recorder {
body,
});
} catch (e) {
const type = reqresp.resourceType;
if (type === "Document") {
logger.debug(
"document not loaded in browser, possibly other URLs missing",
{ url, type: reqresp.resourceType },
"recorder",
);
} else {
logger.debug(
"URL not loaded in browser",
{ url, type: reqresp.resourceType },
"recorder",
);
}
const { resourceType } = reqresp;
const msg =
resourceType === "document"
? "document not loaded in browser, possibly other URLs missing"
: "URL not loaded in browser";

logger.debug(msg, { url, resourceType }, "recorder");
}

return true;
Expand Down

0 comments on commit 65133c9

Please sign in to comment.