forked from Gitlink/microservices
feat(项目管理产品需求重构): 完善需规对应的项目计划逻辑
优化Forge异常时错误提示 Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
parent
464ce4e286
commit
be55a0d4e5
|
|
@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONArray;
|
|||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.microservices.common.core.constant.Constants;
|
||||
import com.microservices.common.core.constant.HttpStatus;
|
||||
import com.microservices.common.core.exception.ServiceException;
|
||||
import com.microservices.common.httpClient.domain.CustomHttpDelete;
|
||||
import com.microservices.system.api.domain.SysFileBytes;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
|
|
@ -281,6 +282,9 @@ public class HttpAPIService {
|
|||
long length = httpEntity.getContentLength();
|
||||
if (length != 0L) {
|
||||
String result = EntityUtils.toString(httpEntity);
|
||||
if (!JSON.isValid(result)) {
|
||||
throw new ServiceException("平台接口响应格式异常");
|
||||
}
|
||||
Object resultObj = JSON.parse(result);
|
||||
if (resultObj instanceof JSONArray) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
|
|
|
|||
Loading…
Reference in New Issue