Normalize Benin phone numbers to the new format before sending to registration service

This commit is contained in:
Katherine
2024-12-02 07:57:27 -08:00
committed by GitHub
parent 4d87b741cd
commit 9e312cbdfa
4 changed files with 120 additions and 10 deletions

View File

@@ -160,7 +160,7 @@ public class VerificationController {
final Phonenumber.PhoneNumber phoneNumber;
try {
phoneNumber = PhoneNumberUtil.getInstance().parse(request.getNumber(), null);
phoneNumber = Util.canonicalizePhoneNumber(PhoneNumberUtil.getInstance().parse(request.getNumber(), null));
} catch (final NumberParseException e) {
throw new ServerErrorException("could not parse already validated number", Response.Status.INTERNAL_SERVER_ERROR);
}