frontend: also log error

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-28 00:41:20 -07:00 committed by Simon Zeltser
parent 3089712084
commit 8d1d967d93

View file

@ -360,6 +360,7 @@ func (fe *frontendServer) setCurrencyHandler(w http.ResponseWriter, r *http.Requ
} }
func renderHTTPError(w http.ResponseWriter, err error, code int) { func renderHTTPError(w http.ResponseWriter, err error, code int) {
log.Printf("[error] %+v (code=%d)", err, code)
w.WriteHeader(code) w.WriteHeader(code)
templates.ExecuteTemplate(w, "error", map[string]interface{}{ templates.ExecuteTemplate(w, "error", map[string]interface{}{
"error": err.Error(), "error": err.Error(),