summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-06-28 07:56:29 -0400
committerJoram Wilander <jwawilander@gmail.com>2017-06-28 07:56:29 -0400
commitc66799a83943af0ae03b17b657936e5327c55550 (patch)
treeca1bf150190fa95f84d010a854937817a03f6129 /store
parent4484c82b1becc2fe5ab7b6842b3419b16c523445 (diff)
downloadchat-c66799a83943af0ae03b17b657936e5327c55550.tar.gz
chat-c66799a83943af0ae03b17b657936e5327c55550.tar.bz2
chat-c66799a83943af0ae03b17b657936e5327c55550.zip
Fixed error information being obscured when joining teams with API v4 (#6751)
Diffstat (limited to 'store')
-rw-r--r--store/sql_team_store.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_team_store.go b/store/sql_team_store.go
index 86e1fed62..6a2bcc9b0 100644
--- a/store/sql_team_store.go
+++ b/store/sql_team_store.go
@@ -191,7 +191,7 @@ func (s SqlTeamStore) GetByInviteId(inviteId string) StoreChannel {
team := model.Team{}
if err := s.GetReplica().SelectOne(&team, "SELECT * FROM Teams WHERE Id = :InviteId OR InviteId = :InviteId", map[string]interface{}{"InviteId": inviteId}); err != nil {
- result.Err = model.NewLocAppError("SqlTeamStore.GetByInviteId", "store.sql_team.get_by_invite_id.finding.app_error", nil, "inviteId="+inviteId+", "+err.Error())
+ result.Err = model.NewAppError("SqlTeamStore.GetByInviteId", "store.sql_team.get_by_invite_id.finding.app_error", nil, "inviteId="+inviteId+", "+err.Error(), http.StatusNotFound)
}
if len(team.InviteId) == 0 {
@@ -199,7 +199,7 @@ func (s SqlTeamStore) GetByInviteId(inviteId string) StoreChannel {
}
if len(inviteId) == 0 || team.InviteId != inviteId {
- result.Err = model.NewLocAppError("SqlTeamStore.GetByInviteId", "store.sql_team.get_by_invite_id.find.app_error", nil, "inviteId="+inviteId)
+ result.Err = model.NewAppError("SqlTeamStore.GetByInviteId", "store.sql_team.get_by_invite_id.find.app_error", nil, "inviteId="+inviteId, http.StatusNotFound)
}
result.Data = &team