Skip to content

Commit 1e28539

Browse files
yroblaCopilot
andauthored
Update pkg/transport/bridge.go
Co-authored-by: Copilot <[email protected]>
1 parent fcd993b commit 1e28539

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/transport/bridge.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,11 @@ func (b *StdioBridge) sendInitialize(ctx context.Context) {
283283
logger.Errorf("Failed to marshal initialize request body: %v", err)
284284
return
285285
}
286-
req, _ := http.NewRequestWithContext(ctx, "POST", b.postURL.String(), bytes.NewReader(reqBody))
286+
req, err := http.NewRequestWithContext(ctx, "POST", b.postURL.String(), bytes.NewReader(reqBody))
287+
if err != nil {
288+
logger.Errorf("Failed to create HTTP request: %v", err)
289+
return
290+
}
287291
req.Header.Set("Content-Type", "application/json")
288292
req.Header.Set("Accept", "application/json, text/event-stream")
289293
copyHeaders(req.Header, b.headers)

0 commit comments

Comments
 (0)