Skip to content

Commit

Permalink
[query] Fix log statement that obscures error returned when failed to…
Browse files Browse the repository at this point in the history
… write Prom response to client (#3638)
  • Loading branch information
robskillington authored Jul 30, 2021
1 parent a984336 commit 29722e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/query/api/v1/handler/prom/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ func (h *readHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}

err = Respond(w, &QueryData{
if err := Respond(w, &QueryData{
Result: res.Value,
ResultType: res.Value.Type(),
}, res.Warnings)
if err != nil {
}, res.Warnings); err != nil {
h.logger.Error("error writing prom response",
zap.Error(res.Err), zap.String("query", params.Query),
zap.Error(err),
zap.String("query", params.Query),
zap.Bool("instant", h.opts.instant))
}
}
Expand Down

0 comments on commit 29722e7

Please sign in to comment.