1
0
Fork 0
mirror of synced 2024-09-28 07:21:35 +12:00

fixed: wrong error message show on adding duplicate number to a user

This commit is contained in:
Akshay Rana 2022-10-04 23:48:15 +05:30
parent 676709e706
commit da9133ae85

View file

@ -888,7 +888,7 @@ App::patch('/v1/users/:userId/phone')
try {
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
} catch (Duplicate $th) {
throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS);
throw new Exception(Exception::USER_PHONE_ALREADY_EXISTS);
}
$events->setParam('userId', $user->getId());