Skip to content

Commit

Permalink
fix : 인증되지 않은 User 에러 반환 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
oosedus committed Oct 28, 2024
1 parent 15e56e1 commit 4cd29f1
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 4cd29f1

Please sign in to comment.