Skip to content

Commit 243d135

Browse files
Implemented co-pilot feedback
1 parent d67d233 commit 243d135

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/msal-node/src/network/HttpClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ export class HttpClient implements INetworkModule {
452452

453453
/**
454454
* Helper function to log URLs with PII-aware sanitization using pre-bound method
455-
* @param urlString {string} the URL to log
456455
* @param label {string} the label for the log message
456+
* @param urlString {string} the URL to log
457457
*/
458458
private logUrlWithPiiAwareness = (
459459
label: string,
@@ -462,7 +462,7 @@ export class HttpClient implements INetworkModule {
462462
if (this.isPiiEnabled) {
463463
this.logger.errorPii(`[MSAL-Network] ${label}: ${urlString}`, "");
464464
} else {
465-
let urlHelper;
465+
let urlHelper: string;
466466
try {
467467
const url = new URL(urlString);
468468
urlHelper = `${url.protocol}//${url.host}${url.pathname}`;

lib/msal-node/test/network/HttpClient.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ describe("HttpClient", () => {
376376

377377
describe("Timeout Error (Post Requests Only)", () => {
378378
const timeoutInMilliseconds: number = 100;
379-
const error: Error = new Error("Request time out after 100ms");
379+
const error: Error = new Error(
380+
`Request time out after ${timeoutInMilliseconds}ms`
381+
);
380382

381383
test("Via Https", async () => {
382384
(https.request as jest.Mock).mockImplementationOnce(

0 commit comments

Comments
 (0)