alibaba/nacos · error · NacosApiException
PARAMETER_MISSING
PARAMETER_MISSING
Error message
namespaceId is required
What it means
SkillsFileQueryForm backs the skill-file fetch endpoint and requires a non-blank namespaceId. If it is blank, the validator throws PARAMETER_MISSING (HTTP 400).
Source
Thrown at ai-registry-adaptor/src/main/java/com/alibaba/nacos/airegistry/form/SkillsFileQueryForm.java:40
import com.alibaba.nacos.common.utils.StringUtils;
/**
* Query form for skills CLI compatible file fetch endpoint.
*
* @author nacos
*/
public class SkillsFileQueryForm implements NacosForm {
private String namespaceId;
private String skillName;
private String filePath;
@Override
public void validate() throws NacosApiException {
if (StringUtils.isBlank(namespaceId)) {
throw new NacosApiException(NacosApiException.INVALID_PARAM,
ErrorCode.PARAMETER_MISSING,
"namespaceId is required");
}
if (StringUtils.isBlank(skillName)) {
throw new NacosApiException(NacosApiException.INVALID_PARAM,
ErrorCode.PARAMETER_MISSING,
"skillName is required");
}
if (StringUtils.isBlank(filePath)) {
throw new NacosApiException(NacosApiException.INVALID_PARAM,
ErrorCode.PARAMETER_MISSING,
"filePath is required");
}
if (filePath.startsWith("/") || filePath.startsWith("\\") || filePath.contains("..")) {
throw new NacosApiException(NacosApiException.INVALID_PARAM,
ErrorCode.PARAMETER_VALIDATE_ERROR,
"filePath is invalid");
}View on GitHub (pinned to 9b989acdf1)
Solutions
- Pass ?namespaceId=<ns> explicitly.
- If you mean the default namespace, send its id rather than omitting the param.
- Ensure your client always sets namespaceId for skill-file queries.
Example fix
// before GET /skill-file?skillName=x&filePath=README.md // after GET /skill-file?namespaceId=public&skillName=x&filePath=README.md
Defensive patterns
Strategy: validation
Validate before calling
if (StringUtils.isBlank(namespaceId)) {
throw new IllegalArgumentException("namespaceId is required for skill-file queries");
} Prevention
- Always set namespaceId in the client, even for the default namespace.
- Centralize required-param checks in a request builder.
- Log which param is missing when validation fails.
When it happens
Trigger: Calling the skill-file endpoint without ?namespaceId= (or with an empty value).
Common situations: Assuming the server defaults the namespace; a client that does not propagate the tenant; URL building that drops the empty param.
Related errors
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/915a9546e3a51004.
Report an issue: GitHub.