http.go: incorrect error message displayed when no metrics encoded error
The "No metrics encoded" error was erroneously displayed the value of err, not lastErr.
This commit is contained in:
parent
61d8c3f402
commit
a166207919
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue