From 6d92c632b7913851b4aff210489625d2d88d34e3 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 3 Nov 2021 11:33:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AF=BC=E5=85=A5):=20#1007599=20=E3=80=90github#5502=E3=80=91?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89=E6=A8=A1=E5=9D=97=E6=A0=91?= =?UTF-8?q?=E8=B6=85=E8=BF=878=E5=B1=82=E5=B8=8C=E6=9C=9B=E6=9C=89?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1007599 --user=宋天阳 【github#5502】接口定义模块树超过8层希望有提示 https://www.tapd.cn/55049933/s/1063419 --- .../io/metersphere/api/service/ApiDefinitionService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 16e58806dc..29e24cf5b9 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -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());