diff --git a/plugins/querytranslate/middleware.go b/plugins/querytranslate/middleware.go index e7d1006c..cb10ec4f 100644 --- a/plugins/querytranslate/middleware.go +++ b/plugins/querytranslate/middleware.go @@ -96,6 +96,7 @@ func saveRequestToCtx(h http.HandlerFunc) http.HandlerFunc { err = json.Unmarshal(buf.Bytes(), &body) if err != nil { log.Errorln(logTag, "error while unmarshalling request body to save to context", err) + telemetry.WriteBackErrorWithTelemetry(req, w, err.Error(), http.StatusBadRequest) return }