{"record":{"id":"6d279c2cafc2387a","repo":"iflytek/astron-agent","slug":"workflow-high-param-failed","errorCode":"WORKFLOW_HIGH_PARAM_FAILED","errorMessage":"ResponseEnum.WORKFLOW_HIGH_PARAM_FAILED","messagePattern":"ResponseEnum\\.WORKFLOW_HIGH_PARAM_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":2115,"sourceCode":"                : originalConfig.getBytes(StandardCharsets.UTF_8).length;\n        int updateBytes = -1;\n        try {\n            ObjectMapper mapper = new ObjectMapper();\n            ObjectNode original = originalConfig == null\n                    ? mapper.createObjectNode()\n                    : (ObjectNode) mapper.readTree(originalConfig);\n            String updateConfig = new JSONObject(saveReq.getAdvancedConfig()).toJSONString();\n            updateBytes = updateConfig.getBytes(StandardCharsets.UTF_8).length;\n            ObjectNode updateNode = (ObjectNode) mapper.readTree(updateConfig);\n            mergeJsonNodes(original, updateNode);\n            workflow.setAdvancedConfig(mapper.writeValueAsString(original));\n        } catch (Exception ex) {\n            log.error(\n                    \"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);","sourceCodeStart":2097,"sourceCodeEnd":2133,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java#L2097-L2133","documentation":"Wrap-around error thrown when persisting an updated advancedConfig JSON blob to the workflow record fails for any reason (serialization, DB write, unexpected exception). The original exception is logged with byte sizes and a BusinessException with WORKFLOW_HIGH_PARAM_FAILED is raised instead. It means the advanced (high-level) parameter section could not be saved.","triggerScenarios":"updateWorkflowAdvancedConfig-style calls where serializing or writing the advancedConfig bytes fails: DB error on update, invalid config JSON produced upstream, or any RuntimeException in the try block.","commonSituations":"advancedConfig exceeding column size; DB connection failure mid-save; upstream code changed the config schema so serialization breaks; transient DB outage.","solutions":["Check the server log for 'update advancedConfig failed' to see errorType and byte sizes","Validate that advancedConfig JSON is well-formed and within column size limits before calling","Retry the save; if DB-related, check database connectivity/health","Compare originalBytes vs updateBytes to detect oversized payloads and trim the config"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"String json = JSON.toJSONString(advancedConfig); if (json.getBytes(StandardCharsets.UTF_8).length > CommonConst.MEDIUM_TEXT_BYTES_LIMIT) { throw new IllegalArgumentException(\"advancedConfig too large\"); }","typeGuard":null,"tryCatchPattern":"try { workflowService.updateAdvancedConfig(req); } catch (BusinessException e) { log.error(\"advancedConfig save failed\", e); /* validate payload, retry */ }","preventionTips":["Validate advancedConfig JSON is serializable and size-bounded before save","Monitor DB health before bulk workflow updates","Keep advancedConfig schema in sync with the service version"],"tags":["database","persistence","workflow"],"backgroundTag":"database-write-failed","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"}