# Incorrect error response when editing the phone number of a wallet/user

**URL:** <https://community.rapyd.net/t/incorrect-error-response-when-editing-the-phone-number-of-a-wallet-user/58167>\
**Category:** ⚙️ API\
**Tags:** wallet-api, bug-report\
**Created:** [December 2, 2022, 5:00am UTC](https://community.rapyd.net/t/incorrect-error-response-when-editing-the-phone-number-of-a-wallet-user/58167 "2022-12-02T05:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlupo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/dlupo/32/901_2.png) [@dlupo](https://community.rapyd.net/u/dlupo)\
**Post date:** [December 2, 2022, 5:00am UTC](https://community.rapyd.net/t/incorrect-error-response-when-editing-the-phone-number-of-a-wallet-user/58167/1 "2022-12-02T05:00:00Z")

</div>

Hey guys, this error almost drive me to insanity for the last couple of hours and I wanted to share it here in case somebody else has the same issue.

If you edit a wallet (endpoint: /v1/user, weirdly enough) and in your body you include the field _phone\_numer_:

```auto
      ewallet: 'ewallet_821c0b02dcbb41d88795291976b56ce8',
      first_name: 'Test',
      last_name: 'User',
      phone_number: '+393317241899'

```

Sometimes you get an error message like this:

> The request attempted an operation that requires a phone number, but the phone number was missing or not recognized. The request was rejected. Corrective action: Use the correct number in E.164 format.

This is misleading and the reason I lost 2 hours thinking our Rest client was sending something wrong, you see, the _phone\_number_ is not missing and it is in fact in E.164. So why?, well if you have another user in your platform with the same number the editing wallet is trying to add, you receive this error, instead of the duplicate number error you get when you try to do the same thing but in creation instead of editing.

Before somebody says, “well you need to check the duplicity in your end before pushing it to Rapyd”, yes we will, but during development is quite common that data is not in sync or you lose an asset or two, so it is very possible you end up in a situation like ours.

---

<div class="post-metadata">

**Author:** ![CharlesDorsett](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/charlesdorsett/32/47_2.png) [@CharlesDorsett](https://community.rapyd.net/u/CharlesDorsett)\
**Post date:** [December 2, 2022, 1:51pm UTC](https://community.rapyd.net/t/incorrect-error-response-when-editing-the-phone-number-of-a-wallet-user/58167/2 "2022-12-02T13:51:58Z")

</div>

Thanks for bringing this to our attention. I apologize for the confusion in the documentation that led you down this path - we have just fixed it and the change is live right now. In summary, `email` and `phone_number` are deprecated fields at the root of REST requests - this data is supposed to go in the contact.

If you run into any other odd behavior, please let us know and we will help as soon as we can.

---

<div class="post-metadata">

**Author:** ![drew.harris](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/drew.harris/32/1259_2.png) [@drew.harris](https://community.rapyd.net/u/drew.harris)\
**Post date:** [March 27, 2024, 4:29pm UTC](https://community.rapyd.net/t/incorrect-error-response-when-editing-the-phone-number-of-a-wallet-user/58167/3 "2024-03-27T16:29:16Z")

</div>


