errcheck issues fixed (#28477)

This commit is contained in:
Arya Khochare
2024-10-04 07:11:24 +02:00
committed by GitHub
parent f3eee28f56
commit cab714a629
2 changed files with 6 additions and 3 deletions
-1
View File
@@ -94,7 +94,6 @@ issues:
channels/api4/license.go|\
channels/api4/license_local.go|\
channels/api4/license_test.go|\
channels/api4/oauth.go|\
channels/api4/oauth_test.go|\
channels/api4/outgoing_oauth_connection_test.go|\
channels/api4/permission.go|\
+6 -2
View File
@@ -153,7 +153,9 @@ func getOAuthApps(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 getOAuthApp(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -308,5 +310,7 @@ func getAuthorizedOAuthApps(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))
}
}