errcheck issues fixed (#28475)

This commit is contained in:
Arya Khochare
2024-10-04 19:12:32 +02:00
committed by GitHub
parent 0a92eb6363
commit 5a7385295c
2 changed files with 4 additions and 2 deletions
-1
View File
@@ -92,7 +92,6 @@ issues:
channels/api4/license_test.go|\
channels/api4/oauth_test.go|\
channels/api4/outgoing_oauth_connection_test.go|\
channels/api4/permission.go|\
channels/api4/plugin.go|\
channels/api4/plugin_test.go|\
channels/api4/post_test.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"
)
func (api *API) InitPermissions() {
@@ -25,5 +26,7 @@ func appendAncillaryPermissionsPost(c *Context, w http.ResponseWriter, r *http.R
c.SetJSONEncodingError(err)
return
}
w.Write(b)
if _, err := w.Write(b); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}