mirror of
https://github.com/Luzifer/promcertcheck.git
synced 2024-11-08 07:50:05 +00:00
Add error logging for http rendering errors
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
88a3e2f3b8
commit
0b62b1cdd8
1 changed files with 4 additions and 2 deletions
6
http.go
6
http.go
|
@ -18,12 +18,14 @@ func htmlHandler(res http.ResponseWriter, r *http.Request) {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
template.ExecuteWriter(pongo2.Context{
|
||||
if err := template.ExecuteWriter(pongo2.Context{
|
||||
"results": probeMonitors,
|
||||
"certificateOK": certificateOK,
|
||||
"certificateExpiresSoon": certificateExpiresSoon,
|
||||
"version": version,
|
||||
}, res)
|
||||
}, res); err != nil {
|
||||
log.WithError(err).Error("Unable to render display template")
|
||||
}
|
||||
}
|
||||
|
||||
func httpStatusHandler(res http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Reference in a new issue