From ee6e245835fa0954ab8b6c438c3abdffd6c25e07 Mon Sep 17 00:00:00 2001 From: Aleksandr Tolstikhin Date: Wed, 27 Nov 2024 00:50:30 +0700 Subject: [PATCH] Replacing of status --- handler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handler.go b/handler.go index 7ccc2af..4bcb421 100644 --- a/handler.go +++ b/handler.go @@ -199,8 +199,7 @@ func (h *Server) HTTPHandlerFunc(handler interface{}) (http.HandlerFunc, error) cf, err := h.newCodec(ct) if err != nil { - w.WriteHeader(http.StatusBadRequest) - _, _ = w.Write([]byte(err.Error())) + w.WriteHeader(http.StatusUnsupportedMediaType) return }