1
0
Fork 0
mirror of https://github.com/Luzifer/promcertcheck.git synced 2024-11-09 16:30:04 +00:00

Add error logging for http rendering errors

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-10-01 15:07:52 +02:00
parent 88a3e2f3b8
commit 0b62b1cdd8
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -18,12 +18,14 @@ func htmlHandler(res http.ResponseWriter, r *http.Request) {
log.Fatal(err) log.Fatal(err)
} }
template.ExecuteWriter(pongo2.Context{ if err := template.ExecuteWriter(pongo2.Context{
"results": probeMonitors, "results": probeMonitors,
"certificateOK": certificateOK, "certificateOK": certificateOK,
"certificateExpiresSoon": certificateExpiresSoon, "certificateExpiresSoon": certificateExpiresSoon,
"version": version, "version": version,
}, res) }, res); err != nil {
log.WithError(err).Error("Unable to render display template")
}
} }
func httpStatusHandler(res http.ResponseWriter, r *http.Request) { func httpStatusHandler(res http.ResponseWriter, r *http.Request) {