Review feedback.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
Tom Wilkie 2018-07-25 13:35:47 +01:00
parent 901e6d1f82
commit 02534510ca

View file

@ -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)
}
}