iflytek/astron-agent · error · BusinessException
RESPONSE_FAILED
RESPONSE_FAILED
Error message
addResult.message()
What it means
After passing the duplicate-name check, WorkflowService.create calls the core 'protocol add' API via callProtocolAdd(createReq). If the returned ApiResult code() != 0, the upstream protocol service rejected the flow creation; the code rethrows RESPONSE_FAILED with the upstream message. This means the core workflow engine refused to create the flow.
Solutions
- Inspect addResult.message() in the exception/logs to see the core-side rejection reason
- Verify commonConfig.getAppId() and domain defaults match what the core protocol service expects
- Check core workflow service health/logs around the failing request
- Ensure console and core versions agree on the WorkflowReq contract
Example fix
// before
ApiResult<String> addResult = callProtocolAdd(createReq);
if (addResult.code() != 0) {
throw new BusinessException(ResponseEnum.RESPONSE_FAILED, addResult.message());
}
// after
ApiResult<String> addResult = callProtocolAdd(createReq);
if (addResult.code() != 0) {
log.error("protocol add failed, name={}, code={}, msg={}", createReq.getName(), addResult.code(), addResult.message());
throw new BusinessException(ResponseEnum.RESPONSE_FAILED, addResult.message());
} Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight: ping core health before create
ApiResult<Boolean> health = coreHealthClient.ping();
if (health == null || health.code() != 0) throw new IllegalStateException("core workflow service unavailable"); Try / catch
try {
workflowService.create(req);
} catch (BusinessException e) {
log.error("workflow create rejected by core: {}", e.getMessage());
throw new ServiceException("core rejected flow creation: " + e.getMessage(), e);
} Prevention
- Keep commonConfig appId/domain values in sync with core expectations
- Monitor core service health and alert before creates fail
- Pin console/core versions during deploys to avoid protocol drift
- Log addResult.code()/message() on every protocol call
When it happens
Trigger: create() invokes callProtocolAdd and the core add protocol responds with a non-zero code — e.g. core service rejects the payload (invalid domain/default model config like generalv3.5, app misconfiguration) or core is degraded and returns an error envelope.
Common situations: Core workflow service down or partially deployed, wrong appId configured in commonConfig, protocol contract change between console and core versions, invalid model/domain defaults.
Related errors
- UPDATE_BOT_FAILED
- BOT_CHAIN_SUBMIT_ERROR
- DATA_NOT_FOUND
- WORKFLOW_VERSION_PUBLISH_FAILED
- SPEAKER_TRAIN_FAILED
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/daf01926ac83da62.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java:1090
.eq(spaceId == null, Workflow::getUid, UserInfoManagerHandler.getUserId())
.eq(spaceId != null, Workflow::getSpaceId, spaceId)
.eq(Workflow::getDeleted, false)
.last("limit 1"));
if (one != null) {
throw new BusinessException(ResponseEnum.WORKFLOW_NAME_EXISTED);
}
createReq.setAppId(commonConfig.getAppId());
if (Boolean.TRUE.equals(createReq.getCommonUser())) {
// Dedicated cloud commonUser logic
createReq.setAppId(commonConfig.getAppId());
createReq.setDomain("generalv3.5");
}
// Core system - add protocol, return flowId
ApiResult<String> addResult = callProtocolAdd(createReq);
if (addResult.code() != 0) {
throw new BusinessException(ResponseEnum.RESPONSE_FAILED, addResult.message());
}
// Product side database storage
Workflow workflow = new Workflow();
org.springframework.beans.BeanUtils.copyProperties(createReq, workflow);
if (createReq.getAdvancedConfig() != null) {
workflow.setAdvancedConfig(new JSONObject(createReq.getAdvancedConfig()).toJSONString());
}
Date now = new Date();
workflow.setCreateTime(now);
workflow.setUpdateTime(now);
workflow.setFlowId(addResult.data());
if (spaceId != null)
workflow.setSpaceId(spaceId);
workflow.setUid(UserInfoManagerHandler.getUserId());
if (StringUtils.isBlank(workflow.getAvatarColor()))
workflow.setAvatarColor("#FFEAD5");
if (StringUtils.isBlank(workflow.getAvatarIcon()))View on GitHub (pinned to 5e758547a8)