From da9133ae853e3885b678bb699240fb30c411652e Mon Sep 17 00:00:00 2001 From: Akshay Rana Date: Tue, 4 Oct 2022 23:48:15 +0530 Subject: [PATCH] fixed: wrong error message show on adding duplicate number to a user --- app/controllers/api/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 407bc1eaab..c95105b775 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -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());