Skip to content

Commit

Permalink
[refactor] 로그인 실패 시, 반환 에러 변경 #66
Browse files Browse the repository at this point in the history
[refactor] 로그인 실패 시, 반환 에러 변경
  • Loading branch information
yangchef1 authored Jun 29, 2024
2 parents a3d23df + 63e0e06 commit 7f8bf2c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ protected void successfulAuthentication(HttpServletRequest request, HttpServletR
}

@Override
protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) {
response.setStatus(401);
protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException {
response.setStatus(404);
response.setContentType("application/json");
response.getWriter().write("{\"error\": \"Member does not exist. Please enter correct user information.\"}");
}
}

0 comments on commit 7f8bf2c

Please sign in to comment.