fix(接口定义导入): #1007599 【github#5502】接口定义模块树超过8层希望有提示

--bug=1007599 --user=宋天阳 【github#5502】接口定义模块树超过8层希望有提示
https://www.tapd.cn/55049933/s/1063419
This commit is contained in:
song-tianyang 2021-11-03 11:33:15 +08:00 committed by song-tianyang
parent 9462574ed3
commit 334d6a6bed
1 changed files with 6 additions and 1 deletions

View File

@ -1014,7 +1014,12 @@ public class ApiDefinitionService {
apiImport = (ApiDefinitionImport) Objects.requireNonNull(apiImportParser).parse(file == null ? null : file.getInputStream(), request);
} catch (Exception e) {
LogUtil.error(e.getMessage(), e);
MSException.throwException(Translator.get("parse_data_error"));
String returnThrowException = e.getMessage();
if(StringUtils.contains(returnThrowException,"模块树最大深度为")){
MSException.throwException(returnThrowException);
}else {
MSException.throwException(Translator.get("parse_data_error"));
}
// 发送通知
if (StringUtils.equals(request.getType(), "schedule")) {
String scheduleId = scheduleService.getScheduleInfo(request.getResourceId());