fix: missing return after error response (#16920)

This commit is contained in:
Aditya Manthramurthy 2023-03-29 16:21:13 -07:00 committed by GitHub
parent 483b226cc1
commit 518f6e4d39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1193,6 +1193,7 @@ func (s *peerRESTServer) GetBandwidth(w http.ResponseWriter, r *http.Request) {
func (s *peerRESTServer) GetPeerMetrics(w http.ResponseWriter, r *http.Request) {
if !s.IsValid(w, r) {
s.writeErrorResponse(w, errors.New("invalid request"))
return
}
enc := gob.NewEncoder(w)