{"record":{"id":"d7ca9e270f51f5c7","repo":"alibaba/nacos","slug":"parameter-missing-d7ca9e","errorCode":"PARAMETER_MISSING","errorMessage":"Required ARD artifact parameter not present","messagePattern":"Required ARD artifact parameter not present","errorType":"exception","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"ai-registry-adaptor/src/main/java/com/alibaba/nacos/airegistry/service/ard/ArdArtifactService.java","lineNumber":77,"sourceCode":"    \n    @Autowired\n    public ArdArtifactService(AiResourceManager resourceManager,\n        McpServerOperationService mcpServerOperationService,\n        AiResourceFileReader fileReader, SkillClientOperationService skillClientOperationService) {\n        this.resourceManager = resourceManager;\n        this.mcpServerOperationService = mcpServerOperationService;\n        this.fileReader = fileReader;\n        this.skillClientOperationService = skillClientOperationService;\n    }\n    \n    /**\n     * Load a versioned ARD artifact.\n     */\n    public ArdArtifact get(String namespaceId, String resourceType, String resourceName,\n        String version, String mcpName) throws NacosException {\n        if (StringUtils.isBlank(namespaceId) || StringUtils.isBlank(resourceType)\n            || StringUtils.isBlank(resourceName) || StringUtils.isBlank(version)) {\n            throw new NacosApiException(NacosException.INVALID_PARAM,\n                ErrorCode.PARAMETER_MISSING,\n                \"Required ARD artifact parameter not present\");\n        }\n        if (AiResourceConstants.RESOURCE_TYPE_SKILL.equals(resourceType)) {\n            return skillArtifact(namespaceId, resourceName, version);\n        }\n        if (AiResourceConstants.RESOURCE_TYPE_PROMPT.equals(resourceType)) {\n            return promptArtifact(namespaceId, resourceType, resourceName, version);\n        }\n        if (AiResourceConstants.RESOURCE_TYPE_MCP.equals(resourceType)) {\n            McpServerDetailInfo detail = mcpServerOperationService.getMcpServerDetail(namespaceId,\n                resourceName, mcpName, version);\n            return new ArdArtifact(ArdProtocolConstants.MEDIA_TYPE_MCP, detail);\n        }\n        throw new NacosApiException(NacosException.INVALID_PARAM,\n            ErrorCode.PARAMETER_VALIDATE_ERROR,\n            \"Unsupported ARD artifact resourceType: \" + resourceType);\n    }","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai-registry-adaptor/src/main/java/com/alibaba/nacos/airegistry/service/ard/ArdArtifactService.java#L59-L95","documentation":"ArdArtifactService.get loads a versioned ARD artifact and requires namespaceId, resourceType, resourceName, and version all to be non-blank. If any of the four is blank it throws PARAMETER_MISSING (HTTP 400) before lookup.","triggerScenarios":"Calling GET /artifacts (or the underlying service) missing any of ?namespaceId=, ?resourceType=, ?resourceName=, or ?version=.","commonSituations":"Resolving a catalog URL that omits the version; a client that defaults resourceType to empty; a stale link missing the resource name.","solutions":["Supply all four parameters: namespaceId, resourceType, resourceName, and version.","For resourceType use one of the supported constants (skill, prompt, mcp).","Non-empty-check each parameter client-side before the call."],"exampleFix":"// before\nGET /artifacts?namespaceId=public&resourceType=skill&resourceName=my-skill\n\n// after\nGET /artifacts?namespaceId=public&resourceType=skill&resourceName=my-skill&version=1.0.0","handlingStrategy":"validation","validationCode":"if (StringUtils.isBlank(namespaceId) || StringUtils.isBlank(resourceType)\n        || StringUtils.isBlank(resourceName) || StringUtils.isBlank(version)) {\n    throw new IllegalArgumentException(\n        \"namespaceId, resourceType, resourceName and version are all required\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build artifact URLs from all four components; never omit version.","Validate all four params client-side before the call.","Use supported resourceType constants (skill, prompt, mcp)."],"tags":["ard","validation","artifact","ai"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}