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
+1 -1
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());