alibaba/nacos · error · NacosApiException

20005

20005

Error message

There is already a reviewing version: {reviewingVersion}, cannot {action}

What it means

A CONFLICT (HTTP 409, ErrorCode RESOURCE_CONFLICT/20005) from ensureNoReviewingVersion: the resource already has a version in the REVIEWING state, so starting or replacing another working version (overwrite/replace draft) is blocked. Only one review cycle may be active at a time per resource.

Source

Thrown at ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImpl.java:577

        if (StringUtils.isBlank(info.getEditingVersion())) {
            throw new NacosApiException(NacosException.CONFLICT, ErrorCode.RESOURCE_CONFLICT,
                "No editing draft to delete: " + name);
        }
        resourceManager.doDeleteDraft(namespaceId, name, RESOURCE_TYPE_SKILL,
            v -> deleteSkillStorageForVersion(namespaceId, name, v.getVersion(), v.getStorage()));
        AiResource latestMeta = resourceManager.findMeta(namespaceId, name, RESOURCE_TYPE_SKILL);
        if (latestMeta == null) {
            throw new NacosApiException(NacosException.NOT_FOUND, ErrorCode.RESOURCE_NOT_FOUND,
                "Skill not found after deleting draft: " + name);
        }
        createDraftWithSkill(namespaceId, skill, targetVersion, latestMeta, false, commitMsg);
        return name;
    }
    
    private static void ensureNoReviewingVersion(ResourceVersionInfo info, String action)
        throws NacosApiException {
        if (info != null && StringUtils.isNotBlank(info.getReviewingVersion())) {
            throw new NacosApiException(NacosException.CONFLICT, ErrorCode.RESOURCE_CONFLICT,
                "There is already a reviewing version: " + info.getReviewingVersion()
                    + ", cannot " + action);
        }
    }
    
    /**
     * Resolve the upload version for strict call sites.
     * Priority: SKILL.md YAML front-matter (version / metadata.version) -> meta.json in ZIP -> user-specified targetVersion -> default "0.0.1".
     * Strict callers still reject non-{@code x.y.z}/{@code vN} versions before storage.
     */
    private String resolveUploadVersion(String skillMd, byte[] zipBytes, String targetVersion)
        throws NacosApiException {
        return resolveStrictUploadVersionCandidate(skillMd, zipBytes, targetVersion).getVersion();
    }
    
    private UploadVersionCandidate resolveStrictUploadVersionCandidate(String skillMd,
        byte[] zipBytes,
        String targetVersion) throws NacosApiException {

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Wait for the reviewing version to be resolved (published or rejected/redrafted), then retry.
  2. Cancel/reject the in-flight review first if the workflow permits, then retry the overwrite.
  3. Surface reviewingVersion in the UI so overwrite/replace actions are disabled while a review is active.
Defensive patterns

Strategy: validation

Validate before calling

// Block overwrite/replace actions while a review is in flight.
SkillMeta m = skillOp.getSkillDetail(ns, name);
if (m != null && StringUtils.isNotBlank(m.getVersionInfo().getReviewingVersion())) {
    // disable overwrite/replace in the UI; tell user a review is pending
}

Try / catch

try {
    skillOp.uploadSkillFromZip(req); // overwrite while reviewing
} catch (NacosApiException e) {
    if (e.getErrCode() == NacosException.CONFLICT
            && ErrorCode.RESOURCE_CONFLICT.getCode() == e.getDetailErrCode()
            && e.getErrMsg().contains("already a reviewing version")) {
        // inform user a review is in progress; retry after it resolves
        showReviewingVersionBanner();
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: Calling overwriteUploadedSkill or deleteDraftAndCreateUploadedSkill (both invoke ensureNoReviewingVersion) while info.reviewingVersion is non-blank — i.e. a version was already submitted for review.

Common situations: A submitted review is still pending; the operator forgot a version was in review; retrying an overwrite without resolving the in-flight review.

Related errors


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/e375c71b194041f8. Report an issue: GitHub.