resourceType lowercase fix: (#483)

follow up to #481, check reqresp.resourceType with lowercase value just
set message based on resourceType value
This commit is contained in:
Ilya Kreymer 2024-03-04 23:58:39 -08:00 committed by GitHub
parent 63cedbc91a
commit 65133c9d9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;