diff --git a/pkg/cli/cmd.go b/pkg/cli/cmd.go index 6e136efab7..1dcb8192e1 100644 --- a/pkg/cli/cmd.go +++ b/pkg/cli/cmd.go @@ -148,11 +148,13 @@ func (t Telemetry) CustomMetricsHandlerFor(mb MetricsBuilder) http.Handler { rc, err := mb.Build() if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) + return } _, err = io.Copy(w, rc) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) + return } }) }