Improve logging

This commit is contained in:
2021-04-10 11:59:10 +02:00
parent 76de4ad82c
commit a60190e6ac
3 changed files with 5 additions and 2 deletions

View File

@@ -195,6 +195,7 @@ func (s *Server) HandlerStats(w http.ResponseWriter, r *http.Request) {
stats, err := s.store.Stats(statType, limit)
if err != nil {
s.ServerLogger.Warnw("Error fetching stats", "error", err)
s.WriteAPIError(w, r, http.StatusInternalServerError, "Error fetching stats")
return
}