123456789101112131415161718192021222324252627282930 |
- package com.fdkankan.scene.callback;
- import com.dtflys.forest.callback.OnError;
- import com.dtflys.forest.callback.OnSuccess;
- import com.dtflys.forest.exceptions.ForestRuntimeException;
- import com.dtflys.forest.http.ForestRequest;
- import com.dtflys.forest.http.ForestResponse;
- import com.fdkankan.common.constant.ServerCode;
- import com.fdkankan.common.exception.BusinessException;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.stereotype.Component;
- /**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/4/25
- **/
- @Slf4j
- public class FdkkMiniReqErrorCallback implements OnError {
- @Override
- public void onError(ForestRuntimeException e, ForestRequest forestRequest,
- ForestResponse forestResponse) {
- log.error("跨服务请求失败!", e);
- throw new BusinessException(ServerCode.FEIGN_REQUEST_FAILD);
- }
- }
|