From ff3b9605ff4d4cbd592eb39600dc52b781f3f5e0 Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 22 Mar 2020 15:54:52 +0100 Subject: corrected error handling --- src/http/http.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/http') diff --git a/src/http/http.go b/src/http/http.go index 9bf35e0..b0e0145 100644 --- a/src/http/http.go +++ b/src/http/http.go @@ -286,7 +286,9 @@ func pathHandler(w http.ResponseWriter, r *http.Request) { } err = t.ExecuteTemplate(w, "index", content) - logrus.Warn(err) + if err != nil { + logrus.Warn("Error executing the template: %s", err) + } return } -- cgit 1.4.1