Skip to content

Commit

Permalink
RAC-67 fix : codeSmell μˆ˜μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
ywj9811 committed Feb 21, 2024
1 parent fa22264 commit 310e568
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -18,6 +19,7 @@
@RequiredArgsConstructor
@Service
@Transactional
@Slf4j
public class KakaoAccessTokenUseCase {

@Value("${app-id.kakao}")
Expand Down Expand Up @@ -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();
}
}
Expand All @@ -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();
}
}
Expand All @@ -83,6 +87,7 @@ private KakaoUserInfoResponse getUserInfo(String accessToken) {
.bodyToMono(KakaoUserInfoResponse.class)
.block();
} catch (WebClientResponseException ex) {
log.error("errorMessage : {}", ex.getMessage());
throw new KakaoException();
}
}
Expand Down

0 comments on commit 310e568

Please sign in to comment.