исправлена валидация UTF-8 и Content-Type

This commit is contained in:
2026-10-16 15:34:17 +03:00
parent 9fabf8dff3
commit fe52c2a99f
7 changed files with 331 additions and 17 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ func (h *Handler) CreateChat(w http.ResponseWriter, r *http.Request) {
var req CreateChatRequest
if err := decodeJSON(r, &req); err != nil {
response.WriteError(w, http.StatusBadRequest, response.CodeInvalidRequest, "invalid json: "+err.Error(), reqID)
writeDecodeJSONError(w, reqID, err)
return
}