mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-26 05:01:23 -08:00
Review feedback.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
parent
901e6d1f82
commit
02534510ca
|
@ -838,7 +838,7 @@ func (api *API) respond(w http.ResponseWriter, data interface{}) {
|
|||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
if n, err := w.Write(b); err != nil {
|
||||
level.Error(api.logger).Log("msg", "error writing response", "n", n, "err", err)
|
||||
level.Error(api.logger).Log("msg", "error writing response", "bytesWritten", n, "err", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -875,7 +875,7 @@ func (api *API) respondError(w http.ResponseWriter, apiErr *apiError, data inter
|
|||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(code)
|
||||
if n, err := w.Write(b); err != nil {
|
||||
level.Error(api.logger).Log("msg", "error writing response", "n", n, "err", err)
|
||||
level.Error(api.logger).Log("msg", "error writing response", "bytesWritten", n, "err", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue