保誠-保戶業務員媒合平台
wayne
2022-03-11 242fad1691917c4fd82c7f04b6190a7113628e93
pamapi/src/main/java/com/pollex/pam/web/rest/errors/ExceptionTranslator.java
@@ -9,6 +9,9 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.servlet.http.HttpServletRequest;
import com.pollex.pam.business.service.UsernameAlreadyUsedException;
import com.pollex.pam.business.web.errors.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
@@ -117,7 +120,7 @@
    @ExceptionHandler
    public ResponseEntity<Problem> handleEmailAlreadyUsedException(
        com.pollex.pam.service.EmailAlreadyUsedException ex,
        com.pollex.pam.business.service.EmailAlreadyUsedException ex,
        NativeWebRequest request
    ) {
        EmailAlreadyUsedException problem = new EmailAlreadyUsedException();
@@ -130,7 +133,7 @@
    @ExceptionHandler
    public ResponseEntity<Problem> handleUsernameAlreadyUsedException(
        com.pollex.pam.service.UsernameAlreadyUsedException ex,
        UsernameAlreadyUsedException ex,
        NativeWebRequest request
    ) {
        LoginAlreadyUsedException problem = new LoginAlreadyUsedException();
@@ -143,7 +146,7 @@
    @ExceptionHandler
    public ResponseEntity<Problem> handleInvalidPasswordException(
        com.pollex.pam.service.InvalidPasswordException ex,
        com.pollex.pam.business.service.InvalidPasswordException ex,
        NativeWebRequest request
    ) {
        return create(new InvalidPasswordException(), request);