Skip to content

Commit 93cea63

Browse files
fix the bug that create contextId failed will not throws exception.
1 parent 29cce5e commit 93cea63

File tree

1 file changed

+4
-1
lines changed
  • dss-commons/dss-contextservice/src/main/java/com/webank/wedatasphere/dss/contextservice/service/impl

1 file changed

+4
-1
lines changed

dss-commons/dss-contextservice/src/main/java/com/webank/wedatasphere/dss/contextservice/service/impl/ContextServiceImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
import com.webank.wedatasphere.dss.common.conf.DSSCommonConf;
2121
import com.webank.wedatasphere.dss.common.entity.Resource;
2222
import com.webank.wedatasphere.dss.common.exception.DSSErrorException;
23+
import com.webank.wedatasphere.dss.common.exception.DSSRuntimeException;
2324
import com.webank.wedatasphere.dss.common.exception.ErrorCode;
2425
import com.webank.wedatasphere.dss.common.utils.DSSCommonUtils;
2526
import com.webank.wedatasphere.dss.contextservice.service.ContextService;
27+
import org.apache.commons.lang3.exception.ExceptionUtils;
2628
import org.apache.linkis.common.exception.ErrorException;
2729
import org.apache.linkis.cs.client.ContextClient;
2830
import org.apache.linkis.cs.client.builder.ContextClientFactory;
@@ -76,8 +78,9 @@ public String createContextID(String workspace, String project, String flow, Str
7678
return SerializeHelper.serializeContextID(contextID);
7779
} catch (Exception e) {
7880
logger.error("createContextID error. workspace : {}, project : {}, flow : {}, version : {}, user : {}", workspace, project, flow, version, user, e);
81+
throw new DSSRuntimeException(50032, "Try to ask Linkis for creating a new contextId failed(向Linkis请求创建一个ContextID失败)! Linkis error msg: " +
82+
ExceptionUtils.getRootCauseMessage(e), e);
7983
}
80-
return null;
8184
}
8285

8386
@Override

0 commit comments

Comments
 (0)