联通接口返回不是个json,增加log点观察

master
李一帆 2025-08-04 15:33:08 +08:00
parent f45937d37f
commit a6a9c1926a
1 changed files with 8 additions and 1 deletions

View File

@ -116,7 +116,14 @@ public class AICCHelper {
log.info("apiUploadCallData: {}", resp);
TypeReference<AICCCallRespWrapper<AICCCallRespTask>> type = new TypeReference<AICCCallRespWrapper<AICCCallRespTask>>() {
};
AICCCallRespWrapper<AICCCallRespTask> AICCCallRespWrapper = JSON.parseObject(resp, type);
AICCCallRespWrapper<AICCCallRespTask> AICCCallRespWrapper = null;
try {
AICCCallRespWrapper = JSON.parseObject(resp, type);
} catch (Exception ex) {
log.error("apiUploadCallData: {}", resp);
log.error("error: ", ex);
throw ex;
}
if (AICCCallRespWrapper == null || !AICCCallRespWrapper.isSuccess()) {
initToken();
headers.put("X-Access-Token", getToken());