[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 удалений

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

@@ -239,7 +239,9 @@ func updateConfig(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err = model.NewAppError("updateConfig", "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))
}
return
}
@@ -281,7 +283,9 @@ func getEnvironmentConfig(c *Context, w http.ResponseWriter, r *http.Request) {
})
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
w.Write([]byte(model.StringInterfaceToJSON(envConfig)))
if _, err := w.Write([]byte(model.StringInterfaceToJSON(envConfig))); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}
func patchConfig(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -386,7 +390,9 @@ func patchConfig(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err = model.NewAppError("patchConfig", "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))
}
return
}