forked from mirror/client_golang
Merge pull request #342 from wrouesnel/master
http.go: incorrect error message displayed when no metrics encoded error
This commit is contained in:
commit
535f493f5a
|
@ -96,7 +96,7 @@ func UninstrumentedHandler() http.Handler {
|
||||||
closer.Close()
|
closer.Close()
|
||||||
}
|
}
|
||||||
if lastErr != nil && buf.Len() == 0 {
|
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
|
return
|
||||||
}
|
}
|
||||||
header := w.Header()
|
header := w.Header()
|
||||||
|
|
Loading…
Reference in New Issue