From 397626194fa9e0b14d0ef09560431e8c3c4e17f9 Mon Sep 17 00:00:00 2001 From: Nathan Osman Date: Tue, 26 Apr 2016 17:46:49 -0700 Subject: [PATCH] Added a bit more debug information to failed requests. --- server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.go b/server.go index 9d7a385..316e718 100644 --- a/server.go +++ b/server.go @@ -58,12 +58,14 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) { r, eChan, err := s.cache.GetReader(rewrite(req.RequestURI)) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) + log.Println("[ERR]", err) return } defer r.Close() e := <-eChan if e == nil { http.Error(w, "header retrieval error", http.StatusInternalServerError) + log.Println("[ERR] header retrieval") return } s.writeHeaders(w, e)