From 9e0d629ab1b42577e7fbcdc2c02e51770bec48b0 Mon Sep 17 00:00:00 2001 From: Rohan Sharma <117426013+RS-labhub@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:31:13 +0530 Subject: [PATCH] fix: team local errcheck issues (#28538) Co-authored-by: Mattermost Build --- server/.golangci.yml | 1 - server/channels/api4/team_local.go | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/.golangci.yml b/server/.golangci.yml index 697006074c9..b221e4eb4c8 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -107,7 +107,6 @@ issues: channels/api4/system_local.go|\ channels/api4/system_test.go|\ channels/api4/team.go|\ - channels/api4/team_local.go|\ channels/api4/team_test.go|\ channels/api4/upload_test.go|\ channels/api4/usage.go|\ diff --git a/server/channels/api4/team_local.go b/server/channels/api4/team_local.go index eb54e0fac71..f6d2cbb14b4 100644 --- a/server/channels/api4/team_local.go +++ b/server/channels/api4/team_local.go @@ -180,7 +180,9 @@ func localInviteUsersToTeam(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)) + } } else { var invalidEmailList []string