From 3756176d34ef840027aa3fef977c214587b7addb Mon Sep 17 00:00:00 2001 From: Sithum Sathsara <89584440+SithumSathsaras@users.noreply.github.com> Date: Fri, 18 Oct 2024 02:29:55 -0400 Subject: [PATCH] Fixed Issue: #2195 500 error when sending empty JSON payload to GraphQL server Signed-off-by: Sithum Sathsara <89584440+SithumSathsaras@users.noreply.github.com> --- pkg/metrics/prometheus.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/metrics/prometheus.go b/pkg/metrics/prometheus.go index edc762a593..6603d06ddb 100644 --- a/pkg/metrics/prometheus.go +++ b/pkg/metrics/prometheus.go @@ -278,7 +278,6 @@ func (pc *prometheusCollector) MeasureGraphQLResponseDuration(next http.Handler) // Create a copy of the request body body, err := io.ReadAll(r.Body) - if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return