Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vpranckaitis committed Nov 16, 2020
1 parent f867b1c commit f537edc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/tools/dtest/docker/harness/resources/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,14 @@ func makePostRequest(logger *zap.Logger, url string, body proto.Message) (*http.
if err := (&jsonpb.Marshaler{}).Marshal(data, body); err != nil {
logger.Error("failed to marshal", zap.Error(err))

return &http.Response{}, fmt.Errorf("failed to marshal: %w", err)
return nil, fmt.Errorf("failed to marshal: %w", err)
}

req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, url, data)
if err != nil {
logger.Error("failed to construct request", zap.Error(err))

return &http.Response{}, fmt.Errorf("failed to construct request: %w", err)
return nil, fmt.Errorf("failed to construct request: %w", err)
}

req.Header.Add("Content-Type", "application/json")
Expand Down

0 comments on commit f537edc

Please sign in to comment.