{"record":{"id":"749a781aaf243a2b","repo":"alibaba/nacos","slug":"parameter-missing-749a78","errorCode":"PARAMETER_MISSING","errorMessage":"Required parameter `name` not present","messagePattern":"Required parameter `name` not present","errorType":"validation","errorClass":"NacosApiException","httpStatus":400,"severity":"warning","filePath":"ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillClientOperationServiceImpl.java","lineNumber":78,"sourceCode":"    private final SkillOperationService skillOperationService;\n    \n    private final SkillIndexManifestService manifestService;\n    \n    private final AiResourceVersionPersistService aiResourceVersionPersistService;\n    \n    public SkillClientOperationServiceImpl(@Lazy SkillOperationService skillOperationService,\n        SkillIndexManifestService manifestService,\n        AiResourceVersionPersistService aiResourceVersionPersistService) {\n        this.skillOperationService = skillOperationService;\n        this.manifestService = manifestService;\n        this.aiResourceVersionPersistService = aiResourceVersionPersistService;\n    }\n    \n    @Override\n    public SkillQueryResult querySkill(String namespaceId, String name, String version,\n        String label, String clientMd5) throws NacosException {\n        if (StringUtils.isBlank(name)) {\n            throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,\n                \"Required parameter `name` not present\");\n        }\n        \n        // Step 1: Resolve target version up-front so we can short-circuit on MD5 match without\n        // loading the full skill bytes. Manifest absence here is treated as not-found and falls\n        // through to skillOperationService.querySkill which raises a consistent error message.\n        String resolvedVersion = resolveVersionFromManifest(namespaceId, name, version, label);\n        \n        // Step 2: Read the published content MD5 directly from the version row's storage JSON.\n        String storedMd5 = readStoredContentMd5(namespaceId, name, resolvedVersion);\n        \n        // Step 3: Fast path — client cache is fresh, no need to load skill bytes.\n        if (StringUtils.isNotBlank(storedMd5) && StringUtils.isNotBlank(clientMd5)\n            && storedMd5.equals(clientMd5)) {\n            return SkillQueryResult.notModified(storedMd5, resolvedVersion);\n        }\n        \n        // Step 4: Load the skill via the regular query path. This also validates meta visibility","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillClientOperationServiceImpl.java#L60-L96","documentation":"An INVALID_PARAM (HTTP 400, ErrorCode PARAMETER_MISSING/10000) from the client-facing SkillClientOperationServiceImpl.querySkill: the required name argument is blank. This is the read/discovery path (with MD5 short-circuit), and it refuses to proceed without a resource name rather than returning an ambiguous result.","triggerScenarios":"Calling the skill query/lookup endpoint or SkillClientOperationService.querySkill with an empty or whitespace-only name (version/label/clientMd5 are optional; name is not).","commonSituations":"SDK caller forgot to set the name; frontend sent an empty query field; misrouted request that dropped the name parameter; automated poller with a blank name config.","solutions":["Supply a non-blank name in the query call.","Add a client-side required-field check before invoking the API.","If name is unknown, list skills first (listSkills) to discover it."],"exampleFix":"// before\nclient.querySkill(ns, \"\", null, null, md5); // throws 325\n\n// after\nclient.querySkill(ns, \"weather-tool\", null, null, md5);","handlingStrategy":"validation","validationCode":"if (StringUtils.isBlank(name)) {\n    throw new IllegalArgumentException(\"name is required\");\n}\nclient.querySkill(ns, name.trim(), version, label, clientMd5);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass a non-blank name to querySkill.","Add a client-side required-field check before the call.","If the name is unknown, list skills first to discover it."],"tags":["validation","parameter-missing","query","skill","client"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}