Skip to content

Commit

Permalink
Fixed Issue: guacsec#2195 500 error More inractive
Browse files Browse the repository at this point in the history
Signed-off-by: Sithum Sathsara <[email protected]>
  • Loading branch information
000xs committed Oct 20, 2024
1 parent f84b845 commit d9c22cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/metrics/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (pc *prometheusCollector) MeasureGraphQLResponseDuration(next http.Handler)
OperationName string `json:"operationName"`
}
if !json.Valid(bodyCopy) { // Check if the body is valid JSON
err_msg := fmt.Sprintf("Provided input json couldn't be parsed. likely it was empty or was wrongly structured; error message: %v", err.Error())
err_msg := fmt.Sprintf("The JSON parsing failed due to the following error: '%v'. Please review your input for syntax errors or missing elements.", err.Error())
http.Error(w, err_msg, http.StatusBadRequest)
return
}
Expand Down

0 comments on commit d9c22cc

Please sign in to comment.