MODIFY-千里聆错误信息提示优化

This commit is contained in:
dxfeng 2024-06-28 09:57:56 +08:00
parent 65e6736b8c
commit 13573148de
2 changed files with 13 additions and 6 deletions

View File

@ -100,12 +100,18 @@ public class PositionSdkInstance {
* @return
*/
public static boolean enableSdkClient() {
ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient();
if (client == null || !client.available()) {
new BaseBean().writeLog("checkAvailable failedclient=" + JSON.toJSONString(client));
BaseBean baseBean = new BaseBean();
try {
ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient();
if (client == null || !client.available()) {
baseBean.writeLog("checkAvailable failedclient=" + JSON.toJSONString(client));
return false;
} else {
return true;
}
} catch (Exception e) {
baseBean.writeLog("checkAvailable failed", e);
return false;
} else {
return true;
}
}

View File

@ -7,6 +7,7 @@ import com.engine.core.exception.ECException;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.weaver.rpa.sdk.exception.RpaSdkException;
import lombok.extern.slf4j.Slf4j;
import weaver.general.BaseBean;
import weaver.hrm.User;
@ -68,7 +69,7 @@ public class ResponseResult<T, R> {
log.info("run api , param {}", t);
}
return Ok(f.apply(t));
} catch (CustomizeRunTimeException e) {
} catch (CustomizeRunTimeException | RpaSdkException e) {
log.error("api run fail", e);
return Error(e.getMessage());
} catch (ECException e) {