{"record":{"id":"f1559f3e27816a96","repo":"alibaba/nacos","slug":"parameter-missing-f1559f","errorCode":"PARAMETER_MISSING","errorMessage":"Skill name is required","messagePattern":"Skill name is required","errorType":"exception","errorClass":"NacosApiException","httpStatus":400,"severity":"warning","filePath":"ai/src/main/java/com/alibaba/nacos/ai/form/skills/client/SkillQueryForm.java","lineNumber":54,"sourceCode":"    private String label;\n    \n    /**\n     * Optional content MD5 carried by skill listener. When provided and matches the published\n     * content MD5, the server returns NOT_MODIFIED so the client may keep its local cache.\n     */\n    private String md5;\n    \n    /**\n     * Validate and normalize query parameters.\n     *\n     * @throws NacosApiException if required parameters are missing\n     */\n    public void validate() throws NacosApiException {\n        if (StringUtils.isBlank(namespaceId)) {\n            namespaceId = \"public\";\n        }\n        if (StringUtils.isBlank(name)) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_MISSING,\n                \"Skill name is required\");\n        }\n    }\n    \n    public String getNamespaceId() {\n        return namespaceId;\n    }\n    \n    public void setNamespaceId(String namespaceId) {\n        this.namespaceId = namespaceId;\n    }\n    \n    public String getName() {\n        return name;\n    }\n    \n    public void setName(String name) {","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai/src/main/java/com/alibaba/nacos/ai/form/skills/client/SkillQueryForm.java#L36-L72","documentation":"Thrown by SkillQueryForm.validate() when the skill 'name' field is blank. The skill client-runtime query API requires a non-empty skill name to look up; unlike namespaceId (which defaults to 'public'), name has no default and cannot be omitted. It surfaces as a PARAMETER_MISSING detail code wrapped in a NacosApiException with the INVALID_PARAM top-level code.","triggerScenarios":"Calling the skill query/get HTTP endpoint (the client-runtime skill fetch backed by SkillQueryForm) without supplying the 'name' request parameter, or supplying it as an empty/whitespace string. Any caller that builds a SkillQueryForm programmatically and forgets setName(...).","commonSituations":"A frontend or SDK consumer that constructs the query from optional form fields and submits before the user picks a skill name; copy-paste of a query URL with the name parameter stripped; a listener re-query path that loses the name after a config reload.","solutions":["Supply a non-empty 'name' parameter on the skill query request (the published skill identifier).","If building SkillQueryForm in Java, call form.setName(skillName) and guard with StringUtils.isBlank before invoking the API.","Validate the name client-side before issuing the HTTP call so the user gets an immediate message instead of a server round-trip."],"exampleFix":"// before\nSkillQueryForm form = new SkillQueryForm();\nform.setNamespaceId(\"public\");\n// name never set -> server returns PARAMETER_MISSING\nskillService.querySkill(form);\n\n// after\nSkillQueryForm form = new SkillQueryForm();\nform.setNamespaceId(\"public\");\nform.setName(\"my-skill\"); // required\nskillService.querySkill(form);","handlingStrategy":"validation","validationCode":"if (StringUtils.isBlank(form.getName())) {\n    throw new IllegalArgumentException(\"Skill 'name' is required before querying.\");\n}\nform.validate();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set SkillQueryForm.name from a non-optional input source.","Run form.validate() in a unit test for every request-building code path.","Treat namespaceId as optional (defaults to 'public') but name as mandatory in client code."],"tags":["ai","skill","validation","parameter","http-api"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}