{"record":{"id":"45a1ce7c2616ba2e","repo":"alibaba/nacos","slug":"parameter-missing-45a1ce","errorCode":"PARAMETER_MISSING","errorMessage":"Request parameter `skillName` should not be blank.","messagePattern":"Request parameter `skillName` should not be blank\\.","errorType":"exception","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"ai/src/main/java/com/alibaba/nacos/ai/form/skills/admin/SkillSubmitForm.java","lineNumber":42,"sourceCode":"import java.io.Serial;\n\n/**\n * Skill submit form.\n *\n * @author nacos\n */\npublic class SkillSubmitForm extends SkillForm {\n    \n    @Serial\n    private static final long serialVersionUID = 1L;\n    \n    private String version;\n    \n    @Override\n    public void validate() throws NacosApiException {\n        fillDefaultNamespaceId();\n        if (StringUtils.isBlank(getSkillName())) {\n            throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,\n                \"Request parameter `skillName` should not be blank.\");\n        }\n    }\n    \n    public String getVersion() {\n        return version;\n    }\n    \n    public void setVersion(String version) {\n        this.version = version;\n    }\n}\n","sourceCodeStart":24,"sourceCodeEnd":55,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai/src/main/java/com/alibaba/nacos/ai/form/skills/admin/SkillSubmitForm.java#L24-L55","documentation":"SkillSubmitForm.validate() requires a non-blank `skillName` to submit a skill draft for review/publishing. Submission is keyed to a named skill, so the target must be identified. The form extends SkillForm but overrides validate() to call fillDefaultNamespaceId() directly (skipping super's message) and uses its own skillName-blank check with a backtick-style message. The form also carries an optional `version`.","triggerScenarios":"Calling the skill submit API with skillName missing, empty, or whitespace-only. The check uses StringUtils.isBlank.","commonSituations":"Frontend submit form that didn't bind skillName; sending only version; path variable not mapped to skillName; renaming the field.","solutions":["Include `skillName` of the skill whose draft you are submitting.","Verify the skill exists via list/detail.","Ensure the HTTP param name is `skillName` and binds to the form setter."],"exampleFix":"// before\n{\"version\":\"1.0.0\"}\n// after\n{\"skillName\":\"my-skill\",\"version\":\"1.0.0\"}","handlingStrategy":"validation","validationCode":"// Before calling skill submit\nif (skillName == null || skillName.isBlank()) {\n    throw new IllegalArgumentException(\"skillName is required to submit a skill\");\n}","typeGuard":"// TypeScript\nconst hasSkillName = (s?: string | null): boolean =>\n  s != null && s.trim().length > 0;","tryCatchPattern":"try {\n    form.validate();\n} catch (NacosApiException e) {\n    // skillName missing\n}","preventionTips":["Pre-fill skillName from the draft being submitted.","Bind the path variable to skillName.","Block submit until skillName is set."],"tags":["validation","skill-api","required-field","skill-name","submit"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}