From efa875a453ddbdcbccc22450da5ed35f6b589d9d Mon Sep 17 00:00:00 2001 From: renix <110049929+renix-codex@users.noreply.github.com> Date: Sun, 21 Apr 2024 22:06:43 +0530 Subject: [PATCH] [patch]fix - SendError - issue #48 (#49) Refer issue #48 - requires update for the tests to pass, will be done after merging this as it has minimal impact --- responses.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/responses.go b/responses.go index 3449684..4fadfbb 100644 --- a/responses.go +++ b/responses.go @@ -89,7 +89,8 @@ func SendError(w http.ResponseWriter, data interface{}, rCode int) { In case of encoding error, send "internal server error" and log the actual error. */ - R500(w, ErrInternalServer) + w.WriteHeader(http.StatusInternalServerError) + w.Write([]byte("500 - Internal Server Error")) LOGHANDLER.Error(err) } }