alibaba/nacos · error · NacosApiException
10000
10000
Error message
Version is required for skill version detail
What it means
Thrown by getSkillVersionDetail when the version parameter is blank (StringUtils.isBlank) AFTER the skill meta is confirmed to exist. It is a client PARAMETER_MISSING error (code 10000, HTTP 400). The endpoint requires an explicit version string to disambiguate which version's content to load — there is no implicit 'latest' fallback in this admin path.
Source
Thrown at ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImpl.java:1007
detail.setDownloadCount(meta.getDownloadCount());
detail.setWritable(VisibilityHelper.canWriteResource(meta));
return detail;
}
/**
* Get the full content of a specific skill version by reading its files from storage.
*/
@Override
public Skill getSkillVersionDetail(String namespaceId, String skillName, String version)
throws NacosException {
AiResource meta = resourceManager.findMeta(namespaceId, skillName, RESOURCE_TYPE_SKILL);
if (meta == null) {
throw new NacosApiException(NacosException.NOT_FOUND, ErrorCode.RESOURCE_NOT_FOUND,
"Skill not found: " + skillName);
}
resourceManager.ensureReadableOrNotFound(meta, "Skill not found: " + skillName);
if (StringUtils.isBlank(version)) {
throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,
"Version is required for skill version detail");
}
AiResourceVersion versionRow = resourceManager.findVersion(namespaceId, skillName,
RESOURCE_TYPE_SKILL, version);
if (versionRow == null) {
throw new NacosApiException(NacosException.NOT_FOUND, ErrorCode.RESOURCE_NOT_FOUND,
"Skill version not found: " + skillName + "@" + version);
}
return loadSkillFromStorage(namespaceId, skillName, version, versionRow.getStorage());
}
/**
* Download a specific skill version (same as getVersionDetail but also publishes a download event for metrics).
*/
@Override
public Skill downloadSkillVersion(String namespaceId, String skillName, String version)
throws NacosException {
Skill skill = getSkillVersionDetail(namespaceId, skillName, version);View on GitHub (pinned to 9b989acdf1)
Solutions
- Supply a concrete version string (e.g. '1.0.0' or 'v2') returned by a prior list/detail call.
- If you wanted 'latest', use querySkill with label='latest' instead of getSkillVersionDetail.
- Validate the version field is non-blank client-side before invoking the API.
Example fix
// before skillService.getSkillVersionDetail(ns, name, null) // after String v = skillService.getSkillDetail(ns, name).getVersions().get(0).getVersion(); skillService.getSkillVersionDetail(ns, name, v);
Defensive patterns
Strategy: validation
Validate before calling
if (version == null || version.isBlank()) {
throw new IllegalArgumentException("version is required for getSkillVersionDetail");
} Type guard
static boolean hasVersion(String v) { return v != null && !v.isBlank(); } Prevention
- Treat version as a mandatory field on the version-detail endpoint.
- Use querySkill with label='latest' if you want implicit resolution.
- Add form validation in the UI to block submit when version is unset.
When it happens
Trigger: Calling getSkillVersionDetail with version = null, empty string, or whitespace-only; omitting the version query parameter in the HTTP request; passing 'latest' here (only querySkill resolves labels, not this method).
Common situations: Client SDK call forgetting to set the version field; UI submitting the form before the version dropdown is selected; assuming 'latest' works on the version-detail endpoint (it does not).
Related errors
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/dc578c5b97a3dde7.
Report an issue: GitHub.