{"record":{"id":"8f001a7eab6516c1","repo":"alibaba/nacos","slug":"parameter-missing-8f001a","errorCode":"PARAMETER_MISSING","errorMessage":"namespaceId is required","messagePattern":"namespaceId is required","errorType":"validation","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"ai-registry-adaptor/src/main/java/com/alibaba/nacos/airegistry/form/SkillsSearchForm.java","lineNumber":44,"sourceCode":" *\n * @author nacos\n */\npublic class SkillsSearchForm implements NacosForm {\n    \n    private static final int DEFAULT_LIMIT = 10;\n    \n    private static final int MAX_LIMIT = 10;\n    \n    private String namespaceId;\n    \n    private String q;\n    \n    private Integer limit;\n    \n    @Override\n    public void validate() throws NacosApiException {\n        if (StringUtils.isBlank(namespaceId)) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_MISSING,\n                \"namespaceId is required\");\n        }\n        if (limit == null || limit <= 0) {\n            limit = DEFAULT_LIMIT;\n        }\n        if (limit > MAX_LIMIT) {\n            limit = MAX_LIMIT;\n        }\n    }\n    \n    public String getNamespaceId() {\n        return namespaceId;\n    }\n    \n    public void setNamespaceId(String namespaceId) {\n        this.namespaceId = namespaceId;\n    }","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai-registry-adaptor/src/main/java/com/alibaba/nacos/airegistry/form/SkillsSearchForm.java#L26-L62","documentation":"SkillsSearchForm backs the skill search endpoint and requires a non-blank namespaceId. A blank value throws PARAMETER_MISSING (HTTP 400) before the search runs. (limit is optional and is normalized to DEFAULT_LIMIT/MAX_LIMIT.)","triggerScenarios":"Calling the skill search endpoint without ?namespaceId= (or with an empty value).","commonSituations":"Assuming the server defaults the namespace; a client that does not propagate the tenant for search; URL building that drops the empty param.","solutions":["Pass ?namespaceId=<ns> explicitly.","If you mean the default namespace, send its id rather than omitting the param.","Ensure the client always sets namespaceId for skill searches."],"exampleFix":"// before\nGET /skills/search?q=deploy\n\n// after\nGET /skills/search?namespaceId=public&q=deploy","handlingStrategy":"validation","validationCode":"if (StringUtils.isBlank(namespaceId)) {\n    throw new IllegalArgumentException(\"namespaceId is required for skill search\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set namespaceId for search, including the default namespace.","Centralize required-param checks in the client.","Surface missing-param errors at the UI layer."],"tags":["skill","validation","namespace","search","ai"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}