|
65 | 65 | import org.restcomm.connect.http.exceptions.AuthorizationException; |
66 | 66 | import org.restcomm.connect.http.exceptions.EmailAlreadyExisted; |
67 | 67 | import org.restcomm.connect.http.exceptions.InsufficientPermission; |
68 | | -import org.restcomm.connect.http.exceptions.InvalidEmailFormat; |
| 68 | +import org.restcomm.connect.http.exceptions.InvalidEmailException; |
69 | 69 | import org.restcomm.connect.http.exceptions.PasswordTooWeak; |
70 | 70 | import org.restcomm.connect.http.exceptions.RcmlserverNotifyError; |
71 | 71 | import org.restcomm.connect.identity.EmailValidator; |
@@ -465,7 +465,7 @@ private Client createClientFrom(final Sid accountSid, final MultivaluedMap<Strin |
465 | 465 | * @throws AccountAlreadyClosed |
466 | 466 | */ |
467 | 467 | private Account prepareAccountForUpdate(final Account account, final MultivaluedMap<String, String> data) |
468 | | - throws AccountAlreadyClosed, PasswordTooWeak, EmailAlreadyExisted, InvalidEmailFormat { |
| 468 | + throws AccountAlreadyClosed, PasswordTooWeak, EmailAlreadyExisted, InvalidEmailException { |
469 | 469 | Account result = account; |
470 | 470 | boolean isPasswordReset = false; |
471 | 471 | Account.Status newStatus = null; |
@@ -513,14 +513,14 @@ private Account prepareAccountForUpdate(final Account account, final Multivalued |
513 | 513 | if (data.containsKey("EmailAddress")) { |
514 | 514 | String newEmailAddress = data.getFirst("EmailAddress").toLowerCase(); |
515 | 515 | if (!EmailValidator.isValidEmailFormat(newEmailAddress)) { |
516 | | - throw new InvalidEmailFormat(); |
| 516 | + throw new InvalidEmailException(); |
517 | 517 | } |
518 | 518 | if (accountsDao.getAccount(newEmailAddress) != null) { |
519 | 519 | throw new EmailAlreadyExisted(); |
520 | 520 | } |
521 | 521 | result = result.setEmailAddress(newEmailAddress); |
522 | 522 | } |
523 | | - } catch (AuthorizationException | AccountAlreadyClosed | PasswordTooWeak | EmailAlreadyExisted | InvalidEmailFormat e) { |
| 523 | + } catch (AuthorizationException | AccountAlreadyClosed | PasswordTooWeak | EmailAlreadyExisted | InvalidEmailException e) { |
524 | 524 | // some exceptions should reach outer layers and result in 403 |
525 | 525 | throw e; |
526 | 526 | } catch (Exception e) { |
|
0 commit comments