Skip to content

Conversation

@Robbie-Microsoft
Copy link
Collaborator

This will help customers better debug their failed network requests.

Turned HttpClient into a proper class. Now it can utilize instance variable re-use.

@Robbie-Microsoft Robbie-Microsoft marked this pull request as ready for review October 15, 2025 16:48
@Robbie-Microsoft Robbie-Microsoft requested review from a team as code owners October 15, 2025 16:48
@Copilot Copilot AI review requested due to automatic review settings October 15, 2025 16:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds enhanced logging to the msal-node HttpClient to aid debugging of failed network requests and refactors helper functions into class instance methods.

  • Introduces a Logger to HttpClient with PII-aware URL and header logging.
  • Refactors previous standalone helper functions (network requests, body parsing, request destruction logic) into private instance methods.
  • Updates timeout error messages to include duration.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
lib/msal-node/test/network/HttpClient.spec.ts Adjusts expected timeout error message to include duration.
lib/msal-node/src/network/HttpClient.ts Adds logger integration, converts utility functions to private methods, improves timeout/error handling and PII-aware logging.
change/@azure-msal-node-edb8d743-61e2-4f42-a970-92e01f619a49.json Beachball change file documenting the patch update.

bgavrilMS
bgavrilMS previously approved these changes Oct 20, 2025
bgavrilMS
bgavrilMS previously approved these changes Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants