diff --git a/server/channels/api4/team_test.go b/server/channels/api4/team_test.go index 69ba06f020..8bb0e7efa5 100644 --- a/server/channels/api4/team_test.go +++ b/server/channels/api4/team_test.go @@ -48,7 +48,7 @@ func TestCreateTeam(t *testing.T) { rteam.Id = "" _, resp, err = client.CreateTeam(context.Background(), rteam) - CheckErrorID(t, err, "app.team.save.existing.app_error") + CheckErrorID(t, err, "store.sql_team.save_team.existing.app_error") CheckBadRequestStatus(t, resp) rteam.Name = "" diff --git a/server/channels/app/team.go b/server/channels/app/team.go index 3fb15ccf8a..7e00f87847 100644 --- a/server/channels/app/team.go +++ b/server/channels/app/team.go @@ -120,6 +120,8 @@ func (a *App) CreateTeam(c request.CTX, team *model.Team) (*model.Team, *model.A return nil, model.NewAppError("CreateTeam", "store.sql_channel.save.direct_channel.app_error", nil, "", http.StatusBadRequest).Wrap(err) case invErr.Entity == "Channel" && invErr.Field == "Id": return nil, model.NewAppError("CreateTeam", "store.sql_channel.save_channel.existing.app_error", nil, "id="+invErr.Value.(string), http.StatusBadRequest).Wrap(err) + case invErr.Entity == "Team" && invErr.Field == "id": + return nil, model.NewAppError("CreateTeam", "store.sql_team.save_team.existing.app_error", nil, "id="+invErr.Value.(string), http.StatusBadRequest).Wrap(err) default: return nil, model.NewAppError("CreateTeam", "app.team.save.existing.app_error", nil, "", http.StatusBadRequest).Wrap(err) } diff --git a/server/i18n/en.json b/server/i18n/en.json index 692fb86f17..c61b06cb28 100644 --- a/server/i18n/en.json +++ b/server/i18n/en.json @@ -9874,6 +9874,10 @@ "id": "store.sql_team.save_member.exists.app_error", "translation": "A team member with that ID already exists." }, + { + "id": "store.sql_team.save_team.existing.app_error", + "translation": "A team with this URL already exists." + }, { "id": "store.sql_user.get_for_login.app_error", "translation": "Unable to find an existing account matching your credentials. This team may require an invite from the team owner to join."