Replacing of status

This commit is contained in:
Aleksandr Tolstikhin 2024-11-27 00:50:30 +07:00
parent 2deb9d3df9
commit ee6e245835

View File

@ -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
}