Skip to content

Commit

Permalink
feat: drx logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jbj338033 committed Jul 31, 2024
1 parent 3297b1c commit 821110b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ class AuthServiceImpl(
.retrieve()
.onStatus({ it.is4xxClientError }) {
it.bodyToMono(String::class.java)
.map { body -> {
logger().info("Google Login Failed: $body")
}}
.map { _ -> CustomException(ErrorCode.INVALID_GOOGLE_TOKEN) }
}
.bodyToMono(GoogleTokenResponse::class.java)
Expand All @@ -170,7 +167,7 @@ class AuthServiceImpl(
if (info == null) {
logger().info("Google Login Failed")

throw CustomException(ErrorCode.INVALID_GOOGLE_TOKEN)
throw CustomException(ErrorCode.INVALID_GOOGLE_ACCESS_TOKEN)
}

if (userRepository.existsByEmailAndProviderIsNot(info.email, UserProvider.GOOGLE)) throw CustomException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ enum class ErrorCode(
INVALID_EMAIL_CODE(HttpStatus.BAD_REQUEST, "Invalid email code"),
EMAIL_CODE_NOT_FOUND(HttpStatus.NOT_FOUND, "Email code not found"),
INVALID_GOOGLE_TOKEN(HttpStatus.BAD_REQUEST, "Invalid google token"),
INVALID_GOOGLE_ACCESS_TOKEN(HttpStatus.BAD_REQUEST, "Invalid google access token"),

// Album
ALBUM_NOT_FOUND(HttpStatus.NOT_FOUND, "Album not found"),
Expand Down

0 comments on commit 821110b

Please sign in to comment.