diff --git a/src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/kakao/KakaoAccessTokenUseCase.java b/src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/kakao/KakaoAccessTokenUseCase.java index b8621a77..9da75bbd 100644 --- a/src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/kakao/KakaoAccessTokenUseCase.java +++ b/src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/kakao/KakaoAccessTokenUseCase.java @@ -6,6 +6,7 @@ import com.postgraduate.domain.auth.exception.KakaoCodeException; import com.postgraduate.domain.auth.exception.KakaoException; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.MediaType; import org.springframework.stereotype.Service; @@ -18,6 +19,7 @@ @RequiredArgsConstructor @Service @Transactional +@Slf4j public class KakaoAccessTokenUseCase { @Value("${app-id.kakao}") @@ -45,6 +47,7 @@ public KakaoUserInfoResponse getAccessToken (CodeRequest codeRequest) { .block(); return getUserInfo(tokenInfoResponse.access_token()); } catch (WebClientResponseException ex) { + log.error("errorMessage : {}", ex.getMessage()); throw new KakaoCodeException(); } } @@ -61,6 +64,7 @@ public KakaoUserInfoResponse getDevAccessToken (CodeRequest codeRequest) { .block(); return getUserInfo(tokenInfoResponse.access_token()); } catch (WebClientResponseException ex) { + log.error("errorMessage : {}", ex.getMessage()); throw new KakaoCodeException(); } } @@ -83,6 +87,7 @@ private KakaoUserInfoResponse getUserInfo(String accessToken) { .bodyToMono(KakaoUserInfoResponse.class) .block(); } catch (WebClientResponseException ex) { + log.error("errorMessage : {}", ex.getMessage()); throw new KakaoException(); } }