{"record":{"id":"089bd0ea7cc11a0c","repo":"iflytek/astron-agent","slug":"workflow-import-failed-responseenum","errorCode":"WORKFLOW_IMPORT_FAILED","errorMessage":"ResponseEnum.WORKFLOW_IMPORT_FAILED","messagePattern":"ResponseEnum\\.WORKFLOW_IMPORT_FAILED","errorType":"error_code","errorClass":"BusinessException","httpStatus":null,"severity":"error","filePath":"console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java","lineNumber":2705,"sourceCode":"        if (scope.spaceId() == null && !executableIds.containsAll(repositoryIds)\n                && repoService != null) {\n            HttpServletRequest currentRequest = RequestContextUtil.getCurrentRequest();\n            if (currentRequest == null) {\n                log.warn(\"Skip remote personal repository validation without caller credentials, uid={}\",\n                        scope.uid());\n                return executableIds;\n            }\n            try {\n                JSONArray remoteRepositories = repoService.getStarFireData(currentRequest);\n                List<RepoDto> remote = RepoService.convertAndMergeJsonArrays(\n                        new ArrayList<>(), remoteRepositories, \"\", null);\n                remote.stream()\n                        .map(RepoDto::getCoreRepoId)\n                        .filter(repositoryIds::contains)\n                        .forEach(executableIds::add);\n            } catch (RuntimeException e) {\n                log.error(\"failed to validate remote workflow repository dependencies\", e);\n                throw new BusinessException(ResponseEnum.WORKFLOW_IMPORT_FAILED);\n            }\n        }\n        return executableIds;\n    }\n\n    /** Databases have no public/admin fallback: they follow the database selector ownership scope. */\n    private boolean databaseVisibleInCurrentScope(DbInfo database, ExecutionScope scope) {\n        if (scope.spaceId() == null) {\n            return Objects.equals(database.getUid(), scope.uid())\n                    && database.getSpaceId() == null;\n        }\n        return scope.spaceMember() && Objects.equals(database.getSpaceId(), scope.spaceId());\n    }\n\n    /** Nested workflows reuse the existing workflow visibility semantics. */\n    private boolean workflowVisibleInCurrentScope(Workflow workflow, ExecutionScope scope) {\n        if (Boolean.TRUE.equals(workflow.getIsPublic())) {\n            return true;","sourceCodeStart":2687,"sourceCodeEnd":2723,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java#L2687-L2723","documentation":"Wrap-around error raised when remote validation of workflow repository dependencies fails: querying the remote repository service (RepoDto / coreRepoId lookups) throws a RuntimeException. The service logs 'failed to validate remote workflow repository dependencies' and aborts the import with WORKFLOW_IMPORT_FAILED since it cannot confirm executable repositories.","triggerScenarios":"Importing a workflow whose nodes bind remote repositories while the remote repo service call fails — network error, service down, or a 5xx/garbage response mapped to a RuntimeException.","commonSituations":"Core repo service outage during import; timeout between console backend and remote repo service; environment misconfiguration pointing at the wrong repo service address.","solutions":["Check logs for 'failed to validate remote workflow repository dependencies' for the root cause","Verify the remote repository service is up and reachable (connectivity/DNS)","Retry the import once the remote service recovers","Correct the repo service endpoint configuration if it points to a wrong environment"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { workflowService.importWorkflow(req); } catch (BusinessException e) { if (\"WORKFLOW_IMPORT_FAILED\".equals(e.getCode().name())) { /* check remote repo service health, retry with backoff */ } throw e; }","preventionTips":["Health-check the remote repository service before bulk imports","Set sane timeouts and retries on service-to-service calls","Keep repo service endpoints per-environment correctly configured"],"tags":["import","remote-service","network"],"backgroundTag":"upstream-api-error","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}