diff --git a/web/federate.go b/web/federate.go index 960b55470..8957152ef 100644 --- a/web/federate.go +++ b/web/federate.go @@ -92,7 +92,7 @@ func (h *Handler) federation(w http.ResponseWriter, req *http.Request) { // creating the new one. if protMetricFam != nil { if err := enc.Encode(protMetricFam); err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) + log.With("err", err).Error("federation failed") return } } @@ -133,7 +133,7 @@ func (h *Handler) federation(w http.ResponseWriter, req *http.Request) { // Still have to ship off the last MetricFamily, if any. if protMetricFam != nil { if err := enc.Encode(protMetricFam); err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) + log.With("err", err).Error("federation failed") } } }