1
0
mirror of https://github.com/Luzifer/promcertcheck.git synced 2024-09-19 01:12:56 +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) {