Skip to content

Commit

Permalink
Merge pull request #116 from TeamMody/refactor/#114-reissue-오류-수정
Browse files Browse the repository at this point in the history
Refactor/#114 reissue 오류 수정
  • Loading branch information
seoshinehyo authored Feb 9, 2025
2 parents c96f9c5 + d50a65b commit 21e7ba5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ public BaseResponse<Void> completeRegistration(
)
),
@ApiResponse(
responseCode = "401",
description = "유효하지 않거나 만료된 Refresh Token",
responseCode = "REFRESH_TOKEN404",
description = "유효하지 않은 리프레쉬 토큰일 때 발생합니다. (디비에 동일한 리프레쉬 토큰이 없을 때 발생)",
content = @Content(
mediaType = "application/json",
examples = @ExampleObject(
value = """
{
"timestamp": "2024-01-13T10:00:00",
"code": "AUTH006",
"message": "유효하지 않은 REFRESH TOKEN입니다.",
"code": "REFRESH_TOKEN404",
"message": "REFRESH TOKEN이 유효하지 않습니다.",
"result": null
}
"""
Expand Down Expand Up @@ -243,7 +243,7 @@ public BaseResponse<AccessTokenResponse> reissueToken(
)
),
@ApiResponse(
responseCode = "401",
responseCode = "AUTH401",
description = "인증되지 않은 사용자",
content = @Content(
mediaType = "application/json",
Expand All @@ -260,16 +260,16 @@ public BaseResponse<AccessTokenResponse> reissueToken(
)
),
@ApiResponse(
responseCode = "400",
responseCode = "REFRESH_TOKEN404",
description = "유효하지 않은 Refresh Token",
content = @Content(
mediaType = "application/json",
examples = @ExampleObject(
value = """
{
"timestamp": "2024-01-13T10:00:00",
"code": "AUTH006",
"message": "유효하지 않은 REFRESH TOKEN입니다.",
"code": "REFRESH_TOKEN404",
"message": "REFRESH TOKEN이 유효하지 않습니다.",
"result": null
}
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ public interface RecommendationControllerInterface {
),
@ApiResponse(
responseCode = "RECOMMENDATION404",
description = "사용자의 체형 정보를 찾을 수 없음",
description = "사용자가 추천받은 결과가 없을 때 발생합니다.",
content = @Content(
mediaType = "application/json",
examples = @ExampleObject(
value = """
{
"timestamp": "2025-01-17T00:48:53.9237864",
"code": "MEMBER_BODY_TYPE404",
"message": "체형 분석 결과를 찾을 수 없습니다."
"code": "RECOMMENDATION404",
"message": "해당 추천 결과를 찾을 수 없습니다."
}
"""
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
@AllArgsConstructor
public enum AuthErrorStatus implements BaseCodeInterface {

EMPTY_JWT(HttpStatus.UNAUTHORIZED, "AUTH001", "JWT가 없습니다."),
EXPIRED_MEMBER_JWT(HttpStatus.UNAUTHORIZED, "AUTH002", "만료된 JWT입니다."),
UNSUPPORTED_JWT(HttpStatus.UNAUTHORIZED, "AUTH003", "지원하지 않는 JWT입니다."),

INVALID_ID_TOKEN(HttpStatus.BAD_REQUEST, "AUTH004", "유효하지 않은 ID TOKEN입니다."),
EXPIRED_REFRESH_TOKEN(HttpStatus.BAD_REQUEST, "AUTH005", "만료된 REFRESH TOKEN입니다."),
INVALID_ACCESS_TOKEN(HttpStatus.BAD_REQUEST, "AUTH005", "유효하지 않은 ACCESS TOKEN입니다."),
INVALID_REFRESH_TOKEN(HttpStatus.BAD_REQUEST, "AUTH006", "유효하지 않은 REFRESH TOKEN입니다."),
EMPTY_JWT(HttpStatus.UNAUTHORIZED, "AUTH401", "JWT가 없습니다."),
EXPIRED_MEMBER_JWT(HttpStatus.UNAUTHORIZED, "TOKEN402", "JWT가 만료되었습니다."),
UNSUPPORTED_JWT(HttpStatus.UNAUTHORIZED, "TOKEN403", "지원하지 않는 JWT입니다."),
INVALID_ID_TOKEN(HttpStatus.BAD_REQUEST, "TOKEN401", "유효하지 않은 ID TOKEN입니다."),

EXPIRED_REFRESH_TOKEN(HttpStatus.BAD_REQUEST, "REFRESH_TOKEN401", "REFRESH TOKEN이 만료되었습니다."),
INVALID_ACCESS_TOKEN(HttpStatus.BAD_REQUEST, "ACCESS_TOKEN404", "ACCESS TOKEN이 유효하지 않습니다."),
INVALID_REFRESH_TOKEN(HttpStatus.BAD_REQUEST, "REFRESH_TOKEN404", "REFRESH TOKEN이 유효하지 않습니다."),
FAILED_SOCIAL_LOGIN(HttpStatus.INTERNAL_SERVER_ERROR, "AUTH007", "소셜 로그인에 실패하였습니다."),

FAILED_GITHUB_AUTHENTICATION(HttpStatus.INTERNAL_SERVER_ERROR, "AUTH008", "깃허브 서버와 통신이 실패하였습니다."),
Expand Down

0 comments on commit 21e7ba5

Please sign in to comment.