feat: req preprocessor

This commit is contained in:
mayur.popli
2025-03-20 09:07:43 +05:30
parent aa10fcceaf
commit 5e3422fb24

View File

@@ -107,7 +107,10 @@ func TestNewUUIDSetter(t *testing.T) {
// Define a dummy handler
dummyHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
io.Copy(w, r.Body)
if _, err := io.Copy(w, r.Body); err != nil {
http.Error(w, "Failed to copy request body", http.StatusInternalServerError)
return
}
})
// Apply middleware