Merge pull request #342 from wrouesnel/master

http.go: incorrect error message displayed when no metrics encoded error
This commit is contained in:
Brian Brazil 2017-08-31 09:39:07 +01:00 committed by GitHub
commit 535f493f5a
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ func UninstrumentedHandler() http.Handler {
closer.Close()
}
if lastErr != nil && buf.Len() == 0 {
http.Error(w, "No metrics encoded, last error:\n\n"+err.Error(), http.StatusInternalServerError)
http.Error(w, "No metrics encoded, last error:\n\n"+lastErr.Error(), http.StatusInternalServerError)
return
}
header := w.Header()