From d4b2c95df89d2e17de40d22093bc39907eea758d Mon Sep 17 00:00:00 2001 From: "mayur.popli" Date: Fri, 21 Mar 2025 10:16:51 +0530 Subject: [PATCH] feat: req preprocessor --- .../requestPreProcessor/reqpreprocessor_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shared/plugin/implementation/requestPreProcessor/reqpreprocessor_test.go b/shared/plugin/implementation/requestPreProcessor/reqpreprocessor_test.go index 85001df..6c51307 100644 --- a/shared/plugin/implementation/requestPreProcessor/reqpreprocessor_test.go +++ b/shared/plugin/implementation/requestPreProcessor/reqpreprocessor_test.go @@ -102,8 +102,11 @@ func TestNewUUIDSetter(t *testing.T) { response := map[string]any{ "subscriber_id": subID, } - json.NewEncoder(w).Encode(response) - } else { + if err := json.NewEncoder(w).Encode(response); err != nil { + http.Error(w, "Internal Server Error", http.StatusInternalServerError) + return + } + } else { http.Error(w, "Subscriber ID not found", http.StatusInternalServerError) return }