Log backend errors

This commit is contained in:
Stefan Prodan
2018-08-17 15:38:35 +03:00
parent 896aceb240
commit ddf1b80e1b

View File

@@ -91,7 +91,7 @@ func (s *Server) apiEcho(w http.ResponseWriter, r *http.Request) {
// call backend
resp, err := http.DefaultClient.Do(backendReq.WithContext(ctx))
if err != nil {
log.Error().Msgf("%v backend call failed", r.URL.Path)
log.Error().Err(err).Msgf("backend call to %s failed", backendURL)
jsonError(w, "backend call failed", http.StatusInternalServerError)
return
}