1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

Throw correct response code for duplicate user

This commit is contained in:
kodumbeats 2021-10-05 12:02:54 -04:00
parent a071880f2d
commit 3d6de5da47

View file

@ -1140,7 +1140,7 @@ App::patch('/v1/account/email')
$profile = $dbForInternal->findOne('users', [new Query('email', Query::TYPE_EQUAL, [$email])]); // Get user by email address
if ($profile) {
throw new Exception('User already registered', 400);
throw new Exception('User already registered', 409);
}
try {