iflytek/astron-agent · error · BusinessException

PARSE_INPUT_PARAM_TYPE_FAILED

PARSE_INPUT_PARAM_TYPE_FAILED

Error message

ResponseEnum.PARSE_INPUT_PARAM_TYPE_FAILED

What it means

PARSE_INPUT_PARAM_TYPE_FAILED is thrown when the service scans the workflow protocol for a Start node (id starting with WorkflowConst.NodeType.START) to derive the flow's input parameter types, but no matching Start node is found. The protocol JSON parsed fine, yet its node list contains no start node whose outputs can be converted.

Solutions

  1. Open the workflow in the editor and confirm a Start node exists and is connected; re-save the flow.
  2. Inspect the flow's data JSON and check whether any node id starts with the START prefix expected by WorkflowConst.NodeType.
  3. If importing/migrating flows, run a pre-import validation that requires exactly one start node.
  4. Upgrade/align the protocol version so node ids match what this console build expects.

Example fix

// before
// flow saved with only an LLM node -> PARSE_INPUT_PARAM_TYPE_FAILED
// after
// editor save guard: disallow saving unless exactly one node id starts with "start"
if (nodes.stream().noneMatch(n -> n.getId().startsWith(WorkflowConst.NodeType.START))) {
    throw new ValidationException("Workflow must contain a Start node before saving");
}
Defensive patterns

Strategy: validation

Validate before calling

BizWorkflowData proto = JSON.parseObject(wf.getData(), BizWorkflowData.class);
boolean hasStart = proto.getNodes() != null && proto.getNodes().stream()
    .anyMatch(n -> n.getId() != null && n.getId().startsWith(WorkflowConst.NodeType.START));
if (!hasStart) throw new IllegalStateException("Workflow has no Start node");

Try / catch

try {
    return workflowService.getInputsInfo(flowId);
} catch (BusinessException e) {
    if ("PARSE_INPUT_PARAM_TYPE_FAILED".equals(e.getCode())) {
        return ApiResult.error("Flow must contain a Start node to derive inputs");
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling the getInputsInfo-style flow-input endpoint with a flow whose data JSON has nodes but none whose id begins with the START prefix — e.g. the canvas was saved without a start node, the start node was deleted, or the node id format changed between protocol versions.

Common situations: Hand-edited or imported workflow JSON missing the start node; protocol produced by an older exporter with different node-id conventions; a corrupted canvas save that dropped the start node.

Related errors


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

Appendix: source

Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java:4728

        }

        String data = workflow.getData();
        if (StringUtils.isBlank(data)) {
            log.error("Workflow protocol is empty, id=" + flowId);
            throw new BusinessException(ResponseEnum.WORKFLOW_PROTOCOL_EMPTY);
        }

        BizWorkflowData bizWorkflowData = JSON.parseObject(data, BizWorkflowData.class);
        List<BizWorkflowNode> nodes = bizWorkflowData.getNodes();
        for (BizWorkflowNode node : nodes) {
            if (node.getId().startsWith(WorkflowConst.NodeType.START)) {
                // Parse input
                List<BizInputOutput> outputs = node.getData().getOutputs();
                return JsonConverter.flowInputTypeConvert(JSON.toJSONString(outputs));
            }
        }

        throw new BusinessException(ResponseEnum.PARSE_INPUT_PARAM_TYPE_FAILED);
    }

    public Object getInputsInfo(String flowId) {
        Workflow workflow = getOne(Wrappers.lambdaQuery(Workflow.class).eq(Workflow::getFlowId, flowId));
        if (workflow == null) {
            log.error("Flow not found, id=" + flowId);
            throw new BusinessException(ResponseEnum.NO_WORKFLOW);
        }

        String data = workflow.getData();
        if (StringUtils.isBlank(data)) {
            log.error("Workflow protocol is empty, id=" + flowId);
            throw new BusinessException(ResponseEnum.WORKFLOW_PROTOCOL_EMPTY);
        }

        BizWorkflowData bizWorkflowData = JSON.parseObject(data, BizWorkflowData.class);
        List<BizWorkflowNode> nodes = bizWorkflowData.getNodes();
        for (BizWorkflowNode node : nodes) {

View on GitHub (pinned to 5e758547a8)