fix: system local errcheck issues (#28539)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
This commit is contained in:
Rohan Sharma
2024-10-07 11:39:06 +00:00
committed by GitHub
co-authored by Ben Schumacher
parent 662e59865c
commit 2b7b4100d2
2 changed files with 4 additions and 2 deletions
-1
View File
@@ -105,7 +105,6 @@ issues:
channels/api4/status.go|\
channels/api4/status_test.go|\
channels/api4/system.go|\
channels/api4/system_local.go|\
channels/api4/system_test.go|\
channels/api4/team.go|\
channels/api4/team_local.go|\
+4 -1
View File
@@ -8,6 +8,7 @@ import (
"net/http"
"github.com/mattermost/mattermost/server/public/model"
"github.com/mattermost/mattermost/server/public/shared/mlog"
"github.com/mattermost/mattermost/server/v8/channels/audit"
)
@@ -39,5 +40,7 @@ func localCheckIntegrity(c *Context, w http.ResponseWriter, r *http.Request) {
}
auditRec.Success()
w.Write(data)
if _, err := w.Write(data); err != nil {
c.Logger.Warn("Failed to write response", mlog.Err(err))
}
}