diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 8d0e76ac69..293bd7d112 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -627,8 +627,8 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') throw new Exception('Team IDs don\'t match', 404); } - if ($membership->getAttribute('confirm') !== false) { - throw new Exception('Membership already confirmed', 400); + if ($membership->getAttribute('confirm') === true) { + throw new Exception('Membership already confirmed', 409); } $team = Authorization::skip(fn() => $dbForProject->getDocument('teams', $teamId));