diff --git a/server/.golangci.yml b/server/.golangci.yml index 810c42cdd6a..c2cf4358b99 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -77,7 +77,6 @@ issues: channels/api4/export.go|\ channels/api4/export_test.go|\ channels/api4/file_test.go|\ - channels/api4/group_local.go|\ channels/api4/import_test.go|\ channels/api4/integration_action_test.go|\ channels/api4/ip_filtering_test.go|\ diff --git a/server/channels/api4/group_local.go b/server/channels/api4/group_local.go index b6a3038f1c1..fb9a5d2e158 100644 --- a/server/channels/api4/group_local.go +++ b/server/channels/api4/group_local.go @@ -5,6 +5,8 @@ package api4 import ( "net/http" + + "github.com/mattermost/mattermost/server/public/shared/mlog" ) func (api *API) InitGroupLocal() { @@ -23,7 +25,9 @@ func getGroupsByChannelLocal(c *Context, w http.ResponseWriter, r *http.Request) return } - w.Write(b) + if _, err := w.Write(b); err != nil { + c.Logger.Warn("Error while writing response", mlog.Err(err)) + } } func getGroupsByTeamLocal(c *Context, w http.ResponseWriter, r *http.Request) { @@ -37,5 +41,7 @@ func getGroupsByTeamLocal(c *Context, w http.ResponseWriter, r *http.Request) { return } - w.Write(b) + if _, err := w.Write(b); err != nil { + c.Logger.Warn("Error while writing response", mlog.Err(err)) + } }