diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 5ec75b216a..963a9284df 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1219,7 +1219,7 @@ public class ApiAutomationService { if (CollectionUtils.isNotEmpty(list)) { LogUtil.error("import scenario fail, custom num is exist: " + scenarioWithBLOBs.getCustomNum()); - return scenarioWithBLOBs; + MSException.throwException(Translator.get("import_fail_custom_num_exists") + ": " + scenarioWithBLOBs.getCustomNum()); } if (StringUtils.equals("fullCoverage", apiTestImportRequest.getModeId())) { diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 0173ce6268..e9ac461021 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -223,6 +223,7 @@ delete_check_reference_by=be referenced by Scenario not_execute=Not execute execute_not_pass=Not pass execute_pass=Pass +import_fail_custom_num_exists=import fail, custom num is exists #authsource authsource_name_already_exists=Authentication source name already exists authsource_name_is_null=Authentication source name cannot be empty diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 95df041a3c..40370bbb1f 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -223,6 +223,7 @@ delete_check_reference_by=被场景引用 not_execute=未执行 execute_not_pass=未通过 execute_pass=通过 +import_fail_custom_num_exists=导入失败,自定义ID已存在 #authsource authsource_name_already_exists=认证源名称已经存在 authsource_name_is_null=认证源名称不能为空 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 164699ffdf..3188722a4c 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -223,6 +223,7 @@ delete_check_reference_by=被場景引用 not_execute=未執行 execute_not_pass=未通過 execute_pass=通過 +import_fail_custom_num_exists=導入失敗,自定義ID已存在 #authsource authsource_name_already_exists=認證源名稱已經存在 authsource_name_is_null=認證源名稱不能為空