fix: plugin errcheck issues (#28517)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
This commit is contained in:
Rohan Sharma
2024-10-09 14:56:22 +02:00
committed by GitHub
co-authored by Ben Schumacher
parent 0f200adbe0
commit e41ab1a3b8
2 changed files with 6 additions and 3 deletions
-1
View File
@@ -81,7 +81,6 @@ issues:
channels/api4/license.go|\
channels/api4/license_local.go|\
channels/api4/oauth_test.go|\
channels/api4/plugin.go|\
channels/api4/post_test.go|\
channels/api4/preference_test.go|\
channels/api4/reaction_test.go|\
+6 -2
View File
@@ -276,7 +276,9 @@ func getWebappPlugins(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 getMarketplacePlugins(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -314,7 +316,9 @@ func getMarketplacePlugins(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
w.Write(json)
if _, err := w.Write(json); err != nil {
c.Logger.Warn("Error while writing json response", mlog.Err(err))
}
}
func enablePlugin(c *Context, w http.ResponseWriter, r *http.Request) {