Skip to content

Commit

Permalink
Don't leak the connection error
Browse files Browse the repository at this point in the history
It might be disallowed IP, and we don't want to make it easier to discern connection errors from banned IPs.
  • Loading branch information
brackendawson committed Jan 7, 2023
1 parent 33f7c5a commit 379260d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (s *Server) HandleWebcal(w http.ResponseWriter, r *http.Request) {
upstream, err := s.fetch(upstreamURL)
if err != nil {
log.Errorf("Failed to fetch %q: %s", upstreamURL, err)
http.Error(w, "Failed to fetch calendar: "+err.Error(), http.StatusBadGateway)
http.Error(w, "Failed to fetch calendar.", http.StatusBadGateway)
return
}

Expand Down

0 comments on commit 379260d

Please sign in to comment.