[MM-29049] Fix remaining errcheck errors in app, api4 and web package (#31307)

Co-authored-by: Claude <noreply@anthropic.com>
Этот коммит содержится в:
Ben Schumacher
2025-06-06 07:44:43 +02:00
коммит произвёл GitHub
родитель 7e013f4c1a
Коммит e3452dce94
12 изменённых файлов: 188 добавлений и 115 удалений

Просмотреть файл

@@ -439,7 +439,9 @@ func listCommandAutocompleteSuggestions(c *Context, w http.ResponseWriter, r *ht
c.Err = model.NewAppError("listCommandAutocompleteSuggestions", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err)
return
}
w.Write(js)
if _, err := w.Write(js); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}
func regenCommandToken(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -487,5 +489,7 @@ func regenCommandToken(c *Context, w http.ResponseWriter, r *http.Request) {
resp := make(map[string]string)
resp["token"] = rcmd.Token
w.Write([]byte(model.MapToJSON(resp)))
if _, err := w.Write([]byte(model.MapToJSON(resp))); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}