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:
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.