diff --git a/server/.golangci.yml b/server/.golangci.yml index d37b229915..f25a769447 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -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|\ diff --git a/server/channels/api4/oauth.go b/server/channels/api4/oauth.go index a9f108100c..d65b73f23c 100644 --- a/server/channels/api4/oauth.go +++ b/server/channels/api4/oauth.go @@ -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)) + } }