Skip to content

Remove console.debug statements from HttpClient constructor #1768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 17, 2025

The HttpClient constructor was logging debug messages to the console that were appearing in users' browsers, causing a poor user experience. These messages would appear repeatedly whenever an HttpClient instance was created:

Registered middlewares: _RetryHandler, _RedirectHandler, ParametersNameDecodingHandler, UserAgentHandler, HeadersInspectionHandler, UrlReplaceHandler, CustomFetchHandler
Hint: To improve performance, use MiddlewareFactory.getPerformanceMiddlewares(customFetch) instead of MiddlewareFactory.getDefaultMiddlewares(customFetch)

Changes Made

  • Removed two console.debug() statements from the HttpClient constructor
  • Preserved all existing functionality and middleware setup logic
  • No breaking changes to the public API

Testing

  • All existing tests continue to pass (176 tests)
  • Build process works correctly
  • Verified that debug messages are no longer output during HttpClient instantiation

This is a minimal, surgical fix that eliminates the unwanted console output while maintaining full backward compatibility.

Fixes #1767.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Strange messages about Middleware Remove console.debug statements from HttpClient constructor Jun 17, 2025
@Copilot Copilot AI requested a review from baywet June 17, 2025 14:14
Copilot finished work on behalf of baywet June 17, 2025 14:14
@baywet baywet marked this pull request as ready for review June 17, 2025 14:31
@baywet baywet requested a review from a team as a code owner June 17, 2025 14:31
@baywet baywet enabled auto-merge June 17, 2025 14:31
@baywet baywet merged commit 7f7a4a8 into main Jun 17, 2025
33 checks passed
@baywet baywet deleted the copilot/fix-1767 branch June 17, 2025 19:06
@github-project-automation github-project-automation bot moved this to Done ✔️ in Kiota Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✔️
Development

Successfully merging this pull request may close these issues.

Strange messages about Middleware
4 participants