Add Exception para cuando un correo no exista

Se agregó una excepción para cuando un usuario desee restablecer una contraseña e ingrese un correo inexistente
This commit is contained in:
Mariela Bonilla 2021-07-16 04:54:54 -06:00
parent 0ba88a4c49
commit ce170b230a
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,10 @@
package org.datasurvey.web.rest.errors;
public class EmailNotExistException extends BadRequestAlertException {
private static final long serialVersionUID = 1L;
public EmailNotExistException() {
super(ErrorConstants.EMAIL_NOT_EXISTS_TYPE, "Email not exists!", "userManagement", "emailnotexists");
}
}

View File

@ -12,6 +12,7 @@ public final class ErrorConstants {
public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password");
public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used");
public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used");
public static final URI EMAIL_NOT_EXISTS_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-exists");
private ErrorConstants() {}
}

View File

@ -1,3 +1,4 @@
export const PROBLEM_BASE_URL = 'https://www.jhipster.tech/problem';
export const EMAIL_ALREADY_USED_TYPE = PROBLEM_BASE_URL + '/email-already-used';
export const LOGIN_ALREADY_USED_TYPE = PROBLEM_BASE_URL + '/login-already-used';
export const EMAIL_NOT_EXISTS_TYPE = PROBLEM_BASE_URL + '/email-not-exists';