Err check response writer

This commit is contained in:
Alex Vest
2022-10-04 16:41:34 +01:00
parent 6299b1d8e9
commit 72a1c59cac
+3 -1
View File
@@ -94,7 +94,9 @@ func Healthz() error {
func healthz(w http.ResponseWriter, req *http.Request) {
if healthy {
w.Write([]byte("alive"))
if i, err := w.Write([]byte("alive")); err != nil {
logrus.Infof("failed to write liveness response, wrote: %d bytes, got err: %s", i, err)
}
return
}