diff --git a/src/main/java/io/company/localhost/common/security/handler/MemberAuthFailureHandler.java b/src/main/java/io/company/localhost/common/security/handler/MemberAuthFailureHandler.java index 134b19c..7c3f2ed 100644 --- a/src/main/java/io/company/localhost/common/security/handler/MemberAuthFailureHandler.java +++ b/src/main/java/io/company/localhost/common/security/handler/MemberAuthFailureHandler.java @@ -42,8 +42,10 @@ public class MemberAuthFailureHandler implements AuthenticationFailureHandler { if (exception instanceof BadCredentialsException || message.startsWith("NOT_FOUND")) { res = UserErrorCode.USER_NOT_FOUND.getApiResponse(); - } else if (message.startsWith("NOT_AUTHORIZED")) { + } else if (message.startsWith("NOT_AUTH_USER")) { res = UserErrorCode.NOT_AUTH_USER.getApiResponse(); + } else if (message.startsWith("NOT_AUTHORIZED")) { + res = UserErrorCode.NOT_AUTHORIZED.getApiResponse(); } else if (message.startsWith("EXIT")) { res = UserErrorCode.EXIT_USER.getApiResponse(); }