Skip to content

Commit

Permalink
Merge pull request #28 from KUSITMS-CORECORD/fix/#27
Browse files Browse the repository at this point in the history
[Fix/#27] : 인증되지 않은 User 에러 반환 수정
  • Loading branch information
oosedus authored Oct 28, 2024
2 parents 15e56e1 + 4cd29f1 commit 63d70fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/corecord/dev/common/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ public AuthenticationEntryPoint authenticationEntryPoint() {
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
response.setCharacterEncoding("UTF-8");
response.setStatus(errorStatus.getHttpStatus().value());

response.getWriter()
.write(mapper.writeValueAsString(ApiResponse.error(errorStatus)));
ApiResponse<Object> errorResponse = ApiResponse.error(ErrorStatus.UNAUTHORIZED).getBody();
response.getWriter().write(mapper.writeValueAsString(errorResponse));
};
}

Expand Down

0 comments on commit 63d70fd

Please sign in to comment.