From 3b3c55130f88cba6e186dd31fb46cc0c7929d0cb Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 23 Jan 2020 01:31:48 +0200 Subject: [PATCH] Updated duplicated membership error --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 5609a3ee4..637fb2649 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -321,7 +321,7 @@ $utopia->post('/v1/teams/:teamId/memberships') foreach ($memberships as $member) { if ($member->getAttribute('userId') == $invitee->getUid()) { - throw new Exception('User has already been invited or is already a member of this team', 400); + throw new Exception('User has already been invited or is already a member of this team', 409); } if ($member->getAttribute('userId') == $user->getUid() && in_array('owner', $member->getAttribute('roles', []))) {