Fixed errcheck in server/channel/api4/job.go (#28420)

This commit is contained in:
Nils
2024-10-04 17:50:14 +02:00
committed by GitHub
parent 0c8212078c
commit ac30b9d468
2 changed files with 6 additions and 3 deletions
-1
View File
@@ -86,7 +86,6 @@ issues:
channels/api4/integration_action_test.go|\
channels/api4/ip_filtering.go|\
channels/api4/ip_filtering_test.go|\
channels/api4/job.go|\
channels/api4/job_test.go|\
channels/api4/ldap.go|\
channels/api4/license.go|\
+6 -2
View File
@@ -210,7 +210,9 @@ func getJobs(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err = model.NewAppError("getJobs", "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 getJobsByType(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -241,7 +243,9 @@ func getJobsByType(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
w.Write(js)
if _, err := w.Write(js); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}
func cancelJob(c *Context, w http.ResponseWriter, r *http.Request) {