{"record":{"id":"ae6a92413f89a536","repo":"iflytek/astron-agent","slug":"workflow-protocol-length-limit","errorCode":"WORKFLOW_PROTOCOL_LENGTH_LIMIT","errorMessage":"ResponseEnum.WORKFLOW_PROTOCOL_LENGTH_LIMIT","messagePattern":"ResponseEnum\\.WORKFLOW_PROTOCOL_LENGTH_LIMIT","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":2129,"sourceCode":"                    \"update advancedConfig failed, originalBytes = {}, updateBytes = {}, errorType = {}\",\n                    originalBytes,\n                    updateBytes,\n                    ex.getClass().getSimpleName());\n            throw new BusinessException(ResponseEnum.WORKFLOW_HIGH_PARAM_FAILED);\n        }\n    }\n\n    // ========== 4. Write protocol data (including validation and length limits) ==========\n    private void writeProtocolDataIfPresent(Workflow workflow, BizWorkflowData bizWorkflowData) {\n        if (bizWorkflowData == null) {\n            return;\n        }\n        if (CollectionUtils.isEmpty(bizWorkflowData.getNodes())) {\n            throw new BusinessException(ResponseEnum.WORKFLOW_PROTOCOL_NODE_INFO_CANNOT_EMPTY);\n        }\n        String dataString = JSON.toJSONString(bizWorkflowData);\n        if (dataString.getBytes(StandardCharsets.UTF_8).length > CommonConst.MEDIUM_TEXT_BYTES_LIMIT) {\n            throw new BusinessException(ResponseEnum.WORKFLOW_PROTOCOL_LENGTH_LIMIT);\n        }\n        String old = workflow.getData();\n        if (StringUtils.isNotEmpty(old)) {\n            JSONObject dataInfo = JSON.parseObject(old);\n            dataInfo.put(\"nodes\", bizWorkflowData.getNodes());\n            dataInfo.put(\"edges\", bizWorkflowData.getEdges());\n            workflow.setData(JSON.toJSONString(dataInfo));\n        } else {\n            workflow.setData(dataString);\n        }\n    }\n\n    // ========== 5. SSRF/URL validation ==========\n    private void validateSsrfForNodes(BizWorkflowData bizWorkflowData) {\n        SsrfProperties ssrfProps = new SsrfProperties();\n        ssrfProps.setIpBlaklist(loadIpRules(IP_BLACKLIST_CATEGORY));\n        ssrfProps.setIpWhitelist(loadIpRules(IP_WHITELIST_CATEGORY));\n        SsrfParamGuard ssrfGuard = new SsrfParamGuard(ssrfProps);","sourceCodeStart":2111,"sourceCodeEnd":2147,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java#L2111-L2147","documentation":"Thrown when the JSON-serialized workflow protocol data exceeds CommonConst.MEDIUM_TEXT_BYTES_LIMIT in UTF-8 bytes. The workflow data column (MEDIUMTEXT-sized) cannot hold the payload, so the service rejects the write to avoid truncation or DB errors.","triggerScenarios":"Saving a very large workflow graph: hundreds of nodes/edges, large embedded configurations or pasted content inside node configs; import of an oversized workflow JSON.","commonSituations":"Users building extremely large flows or duplicating nodes until the payload exceeds the limit; embedding base64 assets in node configs; migrating flows from other tools that carry bloated metadata.","solutions":["Reduce workflow size: delete unneeded nodes/edges or split into multiple workflows","Remove large embedded payloads (base64 assets, pasted text) from node configs","Check the serialized size client-side and warn before hitting the limit","Ask the operator to raise MEDIUM_TEXT_BYTES_LIMIT / column size if the platform genuinely needs bigger flows"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"int size = JSON.toJSONString(data).getBytes(StandardCharsets.UTF_8).length; if (size > CommonConst.MEDIUM_TEXT_BYTES_LIMIT) { /* trim or split */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Measure payload size client-side before submit","Avoid embedding base64/binary assets in node configs","Split very large flows into multiple workflows"],"tags":["payload-size","limit","workflow"],"backgroundTag":"payload-too-large","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}