Getting an error when email is changed in edit profile screen

Hi Team,

We’re getting an error when email is changed in edit profile page in JCP build

Error- “Cannot change verified primary email” (SS is attached for reference)

Please look into it. @Chandrahas @kevinfynd @kedar2a @Anudeep_Kumar

curl -X POST -H “User-Agent:Platform/Android Platform-Version/13 App-Name/Personalize-Fynd-Store App-Version/3.0.20 Identifier/com.jpl.jiomart” -H “Accept-Language:en-IN” -H “x-currency-code:INR” -H “x-fp-sdk-version:0.1.30” -H “Authorization:Bearer NjRiMDAyZTEzODZiYWU1OGY4NTZmMDZkOnNmcTdKNDdYNQ==” -H “x-fp-date:20240430T145435Z” -H “host:jiomartplaypitcompany.jiox1.de” -H “x-fp-signature:v1.1:bae3401e9ba6ce7603ea48a5e8e5262c55eea776e764d8509e14205f4392dfa6” -H “x-location-detail:{“city”:“Mumbai”,“country”:“India”,“pincode”:“400001”,“state”:“Maharashtra”}” -H “Content-Type:application/json; charset=UTF-8” -d ‘{“dob”:“1998-04-10”,“email”:“[email protected]”,“first_name”:“Arohi”,“gender”:“female”,“last_name”:“Gupta”}’ "https://jiomartplaypitcompany.jiox1.de/api/service/application/user/profile/v1.0/detail?platform=62f35968d101a6d38c886d85"

{“message”:“Cannot change verified primary email”}

@Groot1321 ,
Platform have 2 fields for email field.
One is primary and another one is secondary. Primary can not be edited but secondary can be.
Let us do implementation in following way:

  • let us use secondary to email for all CRUD operations.
  • As on when this is getting updated, let’s sync back to primary one.

We can discuss this as well.