diff --git a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java index 1a98d601f8..17e5e20735 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java @@ -248,7 +248,7 @@ public class ApiModuleService extends NodeTreeService { private void validateNode(ApiModule node) { if (node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH) { - throw new RuntimeException(Translator.get("test_case_node_level_tip") + MSException.throwException(Translator.get("test_case_node_level_tip") + TestCaseConstants.MAX_NODE_DEPTH + Translator.get("test_case_node_level")); } checkApiModuleExist(node); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java index 30162252af..0cc6edab04 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java @@ -221,7 +221,7 @@ public class ApiScenarioModuleService extends NodeTreeService TestCaseConstants.MAX_NODE_DEPTH) { - throw new RuntimeException(Translator.get("test_case_node_level_tip") + MSException.throwException(Translator.get("test_case_node_level_tip") + TestCaseConstants.MAX_NODE_DEPTH + Translator.get("test_case_node_level")); } checkApiScenarioModuleExist(node);