From 7ce5a022b5ce12e980774b17996140ebcddc0c53 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Fri, 13 May 2022 11:09:45 +0200 Subject: dashboard/app: fix reported error depth (#3138) Lets report templates.ExecuteTemplate() issue too. --- dashboard/app/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dashboard/app/handler.go') diff --git a/dashboard/app/handler.go b/dashboard/app/handler.go index 9f137264f..58f4ff339 100644 --- a/dashboard/app/handler.go +++ b/dashboard/app/handler.go @@ -61,7 +61,8 @@ func handleContext(fn contextHandler) http.Handler { logf(c, "%v", err) w.WriteHeader(http.StatusInternalServerError) if err1 := templates.ExecuteTemplate(w, "error.html", data); err1 != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) + combinedError := fmt.Sprintf("got err \"%v\" processing ExecuteTemplate() for err \"%v\"", err1, err) + http.Error(w, combinedError, http.StatusInternalServerError) } } }) -- cgit mrf-deployment