diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchKtGbsAccessTokenUpdateService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchKtGbsAccessTokenUpdateService.java index 56777fc..ea4eac9 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchKtGbsAccessTokenUpdateService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchKtGbsAccessTokenUpdateService.java @@ -8,6 +8,7 @@ import org.springframework.transaction.annotation.Transactional; import kr.xit.biz.ens.cmm.CmmEnsBizUtils; import kr.xit.biz.ens.model.kt.KtCommonDTO; +import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.service.AbstractService; import kr.xit.core.spring.util.ApiWebClientUtil; @@ -46,11 +47,15 @@ public class EnsBatchKtGbsAccessTokenUpdateService extends AbstractService imple public void modifyAccessToken(final KtCommonDTO.KtMnsRequest dto) { final String url = apiHost + requestToken; - apiWebClient.exchange( + ApiResponseDTO result = apiWebClient.exchange( url, HttpMethod.POST, dto, ApiResponseDTO.class, CmmEnsBizUtils.getHeadeMap()); + + if(!result.isSuccess()){ + throw BizRuntimeException.create(result.getCode(), result.getMessage()); + } } }