iflytek/astron-agent · error · BusinessException
8101
8101
Error message
workflow.version.get.name.failed
What it means
Generic wrapper thrown when generating the next workflow version name fails in buildVersionName. Any unexpected exception while loading existing versions, parsing numeric version suffixes, or incrementing names results in WORKFLOW_VERSION_GET_NAME_FAILED (code 8101).
Solutions
- Inspect server logs for the root exception thrown inside buildVersionName
- Verify existing version names for the flowId are well-formed numeric names (e.g. 1.0, 1.1); fix corrupt rows if any
- Check DB connectivity and workflow_version table health
- Retry; if a specific version row has a malformed name, correct or logically delete that row
Example fix
// before
} catch (Exception e) {
throw new BusinessException(ResponseEnum.WORKFLOW_VERSION_GET_NAME_FAILED);
}
// after
} catch (Exception e) {
log.error("buildVersionName failed, flowId={}", createDto.getFlowId(), e);
throw new BusinessException(ResponseEnum.WORKFLOW_VERSION_GET_NAME_FAILED);
} Defensive patterns
Strategy: try-catch
Validate before calling
List<WorkflowVersion> versions = workflowVersionMapper.selectList(
new LambdaQueryWrapper<WorkflowVersion>().eq(WorkflowVersion::getFlowId, flowId)
.eq(WorkflowVersion::getDeleted, false));
boolean namesWellFormed = versions.stream().allMatch(v ->
v.getName() != null && v.getName().matches("\\d+\\.\\d+")); Try / catch
try {
return buildVersionName(flowId, data, config);
} catch (Exception e) {
log.error("version name generation failed", e);
throw new BusinessException(ResponseEnum.WORKFLOW_VERSION_GET_NAME_FAILED);
} Prevention
- Keep version names strictly numeric (major.minor) in the DB
- Guard extractVersionNumberSafely against malformed names (it already defaults to 0D)
- Add unique constraints/indexes on (flow_id, name) to avoid races
- Alert on DB query failures in version-name paths
When it happens
Trigger: getVersionNameForSpace or getVersionNameForBoundBotPublish invokes buildVersionName and a non-BusinessException occurs: malformed existing version names, DB query failure, or arithmetic/parsing error in incrementVersion/extractVersionNumberSafely.
Common situations: Version names in DB that don't match the expected 'x.y' numeric pattern in unexpected ways; database timeout; null maxName handling; concurrent version creation causing unexpected state.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/e50afa490ae5915b.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/VersionService.java:411
.filter(cfg -> extractVersionNumberSafely(cfg.getName()) > 0D)
.max(Comparator
.comparingDouble((WorkflowConfig cfg) -> extractVersionNumberSafely(cfg.getName()))
.thenComparing(WorkflowConfig::getUpdatedTime, Comparator.nullsLast(Date::compareTo)));
// Compare draft configuration and historical configuration
configNoChange = latestNonDraftCfgOpt
.map(WorkflowConfig::getConfig)
.map(latestCfg -> Objects.equals(latestCfg, draftConfig))
.orElse(false);
}
Boolean advanceConfigChange = Objects.equals(preAdvanceConfig, advancedConfig);
Boolean dataNoChange = Objects.equals(workflow_data, data);
boolean needBump = !(Boolean.TRUE.equals(dataNoChange) && Boolean.TRUE.equals(advanceConfigChange) && configNoChange);
name = incrementVersion(maxName, needBump);
return ApiResult.success(new JSONObject()
.fluentPut("workflowVersionName", name));
} catch (Exception e) {
throw new BusinessException(ResponseEnum.WORKFLOW_VERSION_GET_NAME_FAILED);
}
}
private static double extractVersionNumberSafely(String versionName) {
if (StrUtil.isBlank(versionName)) {
return 0D;
}
try {
return extractVersionNumber(versionName.toLowerCase(Locale.ROOT));
} catch (Exception ignore) {
return 0D;
}
}
/**
* Check if version has system data.
*
* @param createDto Version check parametersView on GitHub (pinned to 5e758547a8)