iflytek/astron-agent · warning · BusinessException

WORKFLOW_SKILL_NAME_DESC_EMPTY

WORKFLOW_SKILL_NAME_DESC_EMPTY

Error message

WORKFLOW_SKILL_NAME_DESC_EMPTY

What it means

exportSkill resolves the workflow name/description from the request or falls back to the stored workflow, and throws WORKFLOW_SKILL_NAME_DESC_EMPTY when either resolved value is blank. A skill export requires a non-empty name and description because both are embedded into the generated skill metadata and content.

Solutions

  1. Pass workflowName and workflowDescription explicitly in the WorkflowSkillExportRequest.
  2. Open the workflow in the editor and set a name and description, then retry the export.
  3. If empty strings are being sent, send null/omit the fields so the server falls back to the stored workflow values.
  4. Add a required description field in the workflow-creation flow to prevent nameless/undescribed workflows.

Example fix

// before
exportSkill({botId: 123, workflowId: 456}); // workflow has blank description
// after
exportSkill({botId: 123, workflowId: 456, workflowName: "My Skill", workflowDescription: "Exports orders via API"});
Defensive patterns

Strategy: validation

Validate before calling

String name = StringUtils.defaultIfBlank(req.getWorkflowName(), workflow.getName());
String desc = StringUtils.defaultIfBlank(req.getWorkflowDescription(), workflow.getDescription());
if (StringUtils.isBlank(name) || StringUtils.isBlank(desc)) {
    promptUserForNameAndDescription(); // before calling export
}

Type guard

boolean hasSkillNameAndDescription(String name, String desc) {
    return StringUtils.isNotBlank(name) && StringUtils.isNotBlank(desc);
}

Try / catch

try {
    return exportSkill(request);
} catch (BusinessException e) {
    if ("WORKFLOW_SKILL_NAME_DESC_EMPTY".equals(e.getCode())) {
        return badRequest("workflow name and description are required for skill export");
    }
    throw e;
}

Prevention

When it happens

Trigger: Both request.workflowName and workflow.name are blank, or both request.workflowDescription and workflow.description are blank — e.g. exporting a workflow that was created without a description and the caller didn't supply one.

Common situations: User skips the description field in the workflow editor then tries to export; a client sends empty-string name/description which defeats the fallback (defaultIfBlank falls through to an empty workflow field); imported workflows with missing metadata.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/576059d93c0dbfca. Report an issue: GitHub.

Appendix: source

Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/workflow/impl/WorkflowSkillExportServiceImpl.java:67

    private final DataPermissionCheckTool dataPermissionCheckTool;

    @Override
    public WorkflowSkillExportResponse exportSkill(WorkflowSkillExportRequest request) {
        if (request == null || request.getBotId() == null || request.getWorkflowId() == null) {
            throw new BusinessException(ResponseEnum.PARAMETER_ERROR);
        }

        Workflow workflow = workflowService.getById(request.getWorkflowId());
        if (workflow == null) {
            throw new BusinessException(ResponseEnum.BOT_NOT_EXIST);
        }
        dataPermissionCheckTool.checkWorkflowBelong(workflow, SpaceInfoUtil.getSpaceId());

        String workflowName = StringUtils.defaultIfBlank(request.getWorkflowName(), workflow.getName());
        String workflowDescription =
                StringUtils.defaultIfBlank(request.getWorkflowDescription(), workflow.getDescription());
        if (StringUtils.isBlank(workflowName) || StringUtils.isBlank(workflowDescription)) {
            throw new BusinessException(ResponseEnum.WORKFLOW_SKILL_NAME_DESC_EMPTY);
        }

        BotApiInfoDTO apiInfo = publishApiService.getApiInfo(request.getBotId());
        if (!hasPublishedApi(apiInfo)) {
            throw new BusinessException(ResponseEnum.WORKFLOW_SKILL_API_NOT_READY);
        }

        List<BizInputOutput> inputs = extractWorkflowInputs(workflow);
        SkillMetadata metadata = generateSkillMetadata(workflowName, workflowDescription, workflow.getId());
        String content = buildSkillContent(metadata, workflowName, workflowDescription, apiInfo, inputs);
        return new WorkflowSkillExportResponse(SKILL_FILE_NAME, content, metadata.aiGenerated());
    }

    private boolean hasPublishedApi(BotApiInfoDTO apiInfo) {
        return apiInfo != null
                && StringUtils.isNotBlank(apiInfo.getAppId())
                && StringUtils.isNotBlank(apiInfo.getAppKey())
                && StringUtils.isNotBlank(apiInfo.getAppSecret())

View on GitHub (pinned to 5e758547a8)