Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/launcher/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func GetOrLaunch(l *Launcher, serverID string) (*mcp.Connection, error) {
// Create an HTTP connection
conn, err := mcp.NewHTTPConnection(l.ctx, serverID, serverCfg.URL, serverCfg.Headers, oidcProvider, oidcAudience, l.config.Gateway.HTTPKeepaliveInterval())
if err != nil {
log.Printf("FAILED to create HTTP connection for server %q: %v", serverID, err)
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This new stderr log prints the raw err from mcp.NewHTTPConnection. That error chain can include full HTTP response bodies (e.g., initialize failed: status=..., body=...) and potentially large or sensitive data, so writing it verbatim to stderr/CI logs risks secret leakage and noisy output. Consider sanitizing/redacting and truncating the error string before printing (and keeping the console format consistent with other launcher stderr logs, e.g. using the [LAUNCHER] prefix).

Copilot uses AI. Check for mistakes.
logger.LogErrorWithServer(serverID, "backend", "Failed to create HTTP connection: %s, error=%v", serverID, err)
l.recordError(serverID, err.Error())
return nil, fmt.Errorf("failed to create HTTP connection: %w", err)
Expand Down