Skip to content

Commit

Permalink
[๐Ÿ”จfix/#141]: SignUpService ํด๋ž˜์Šค ์ œ๊ฑฐ ๋ฐ AuthService์— ํšŒ์›๊ฐ€์ž… ๋กœ์ง ํ†ตํ•ฉ
Browse files Browse the repository at this point in the history
- ํšŒ์›๊ฐ€์ž… ์‹คํŒจ ์‹œ ์ƒํƒœ ์ฝ”๋“œ๋ฅผ 401์—์„œ 400์œผ๋กœ ๋ณ€๊ฒฝ
- ์ด๋ฏธ ์กด์žฌํ•˜๋Š” ์œ ์ €์ผ ๊ฒฝ์šฐ ์ƒํƒœ ์ฝ”๋“œ๋ฅผ 401์—์„œ 409๋กœ ๋ณ€๊ฒฝ
- ์ž˜๋ชป๋œ ๋ฆฌํ”„๋ ˆ์‹œ ํ† ํฐ ์‚ฌ์šฉ ์‹œ ์˜ˆ์™ธ ์ฒ˜๋ฆฌ๋ฅผ INVALID_USER์—์„œ FAILED_TOKEN_REISSUE๋กœ ์ˆ˜์ •
  • Loading branch information
jsoonworld committed Sep 22, 2024
1 parent 3026059 commit 9d60421
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public enum ErrorMessage {
UNAUTHORIZED_JWT_EXCEPTION(401, "์œ ํšจํ•˜์ง€ ์•Š์€ ํ† ํฐ์ž…๋‹ˆ๋‹ค"),

// ํšŒ์›๊ฐ€์ž…
FAILED_SIGN_UP(401, "ํšŒ์›๊ฐ€์ž…์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค"),
EXISTS_USER_ALREADY(401, "์ด๋ฏธ ์กด์žฌํ•˜๋Š” ์œ ์ €์ž…๋‹ˆ๋‹ค"),
FAILED_SIGN_UP(400, "ํšŒ์›๊ฐ€์ž…์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค"),
EXISTS_USER_ALREADY(409, "์ด๋ฏธ ์กด์žฌํ•˜๋Š” ์œ ์ €์ž…๋‹ˆ๋‹ค"),

// ์‚ฌ์šฉ์ž ํ•„ํ„ฐ๋ง ์ •๋ณด ์ƒ์„ฑ
FAILED_SIGN_UP_USER_FILTER_CREATION(404, "์‚ฌ์šฉ์ž ํ•„ํ„ฐ ์ƒ์„ฑ์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private User findUserById(long id) {

private User findUserByRefreshToken(String refreshToken) {
return userRepository.findByRefreshToken(getTokenFromBearerString(refreshToken))
.orElseThrow(() -> new CustomException(INVALID_USER));
.orElseThrow(() -> new CustomException(FAILED_TOKEN_REISSUE));
}


Expand Down

0 comments on commit 9d60421

Please sign in to comment.