Skip to content

Commit

Permalink
write empty object on bad request because it makes grafana not error.
Browse files Browse the repository at this point in the history
  • Loading branch information
tedpearson committed Oct 31, 2023
1 parent 2d61cf6 commit 4a05eff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (s *Server) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
params, err := s.ParseParams(req.Form)
if err != nil {
resp.WriteHeader(http.StatusBadRequest)
resp.Write([]byte("{}"))
return
}

Expand Down

0 comments on commit 4a05eff

Please sign in to comment.