{"record":{"id":"e375c71b194041f8","repo":"alibaba/nacos","slug":"20005-e375c7","errorCode":"20005","errorMessage":"There is already a reviewing version: {reviewingVersion}, cannot {action}","messagePattern":"There is already a reviewing version: (.+?), cannot (.+?)","errorType":"exception","errorClass":"NacosApiException","httpStatus":409,"severity":"error","filePath":"ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImpl.java","lineNumber":577,"sourceCode":"        if (StringUtils.isBlank(info.getEditingVersion())) {\n            throw new NacosApiException(NacosException.CONFLICT, ErrorCode.RESOURCE_CONFLICT,\n                \"No editing draft to delete: \" + name);\n        }\n        resourceManager.doDeleteDraft(namespaceId, name, RESOURCE_TYPE_SKILL,\n            v -> deleteSkillStorageForVersion(namespaceId, name, v.getVersion(), v.getStorage()));\n        AiResource latestMeta = resourceManager.findMeta(namespaceId, name, RESOURCE_TYPE_SKILL);\n        if (latestMeta == null) {\n            throw new NacosApiException(NacosException.NOT_FOUND, ErrorCode.RESOURCE_NOT_FOUND,\n                \"Skill not found after deleting draft: \" + name);\n        }\n        createDraftWithSkill(namespaceId, skill, targetVersion, latestMeta, false, commitMsg);\n        return name;\n    }\n    \n    private static void ensureNoReviewingVersion(ResourceVersionInfo info, String action)\n        throws NacosApiException {\n        if (info != null && StringUtils.isNotBlank(info.getReviewingVersion())) {\n            throw new NacosApiException(NacosException.CONFLICT, ErrorCode.RESOURCE_CONFLICT,\n                \"There is already a reviewing version: \" + info.getReviewingVersion()\n                    + \", cannot \" + action);\n        }\n    }\n    \n    /**\n     * Resolve the upload version for strict call sites.\n     * Priority: SKILL.md YAML front-matter (version / metadata.version) -> meta.json in ZIP -> user-specified targetVersion -> default \"0.0.1\".\n     * Strict callers still reject non-{@code x.y.z}/{@code vN} versions before storage.\n     */\n    private String resolveUploadVersion(String skillMd, byte[] zipBytes, String targetVersion)\n        throws NacosApiException {\n        return resolveStrictUploadVersionCandidate(skillMd, zipBytes, targetVersion).getVersion();\n    }\n    \n    private UploadVersionCandidate resolveStrictUploadVersionCandidate(String skillMd,\n        byte[] zipBytes,\n        String targetVersion) throws NacosApiException {","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImpl.java#L559-L595","documentation":"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.","triggerScenarios":"Calling overwriteUploadedSkill or deleteDraftAndCreateUploadedSkill (both invoke ensureNoReviewingVersion) while info.reviewingVersion is non-blank — i.e. a version was already submitted for review.","commonSituations":"A submitted review is still pending; the operator forgot a version was in review; retrying an overwrite without resolving the in-flight review.","solutions":["Wait for the reviewing version to be resolved (published or rejected/redrafted), then retry.","Cancel/reject the in-flight review first if the workflow permits, then retry the overwrite.","Surface reviewingVersion in the UI so overwrite/replace actions are disabled while a review is active."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Block overwrite/replace actions while a review is in flight.\nSkillMeta m = skillOp.getSkillDetail(ns, name);\nif (m != null && StringUtils.isNotBlank(m.getVersionInfo().getReviewingVersion())) {\n    // disable overwrite/replace in the UI; tell user a review is pending\n}","typeGuard":null,"tryCatchPattern":"try {\n    skillOp.uploadSkillFromZip(req); // overwrite while reviewing\n} catch (NacosApiException e) {\n    if (e.getErrCode() == NacosException.CONFLICT\n            && ErrorCode.RESOURCE_CONFLICT.getCode() == e.getDetailErrCode()\n            && e.getErrMsg().contains(\"already a reviewing version\")) {\n        // inform user a review is in progress; retry after it resolves\n        showReviewingVersionBanner();\n    } else {\n        throw e;\n    }\n}","preventionTips":["Surface reviewingVersion in the UI and disable overwrite/replace while set.","Resolve (publish/reject/redraft) an in-flight review before starting another working version.","Re-precheck before applying overwrite/replace actions."],"tags":["conflict","reviewing","lifecycle","upload","skill"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}