alibaba/nacos · error · NacosApiException

PARAMETER_MISSING

PARAMETER_MISSING

Error message

namespaceId is required

What it means

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.)

Source

Thrown at ai-registry-adaptor/src/main/java/com/alibaba/nacos/airegistry/form/SkillsSearchForm.java:44

 *
 * @author nacos
 */
public class SkillsSearchForm implements NacosForm {
    
    private static final int DEFAULT_LIMIT = 10;
    
    private static final int MAX_LIMIT = 10;
    
    private String namespaceId;
    
    private String q;
    
    private Integer limit;
    
    @Override
    public void validate() throws NacosApiException {
        if (StringUtils.isBlank(namespaceId)) {
            throw new NacosApiException(NacosApiException.INVALID_PARAM,
                ErrorCode.PARAMETER_MISSING,
                "namespaceId is required");
        }
        if (limit == null || limit <= 0) {
            limit = DEFAULT_LIMIT;
        }
        if (limit > MAX_LIMIT) {
            limit = MAX_LIMIT;
        }
    }
    
    public String getNamespaceId() {
        return namespaceId;
    }
    
    public void setNamespaceId(String namespaceId) {
        this.namespaceId = namespaceId;
    }

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Pass ?namespaceId=<ns> explicitly.
  2. If you mean the default namespace, send its id rather than omitting the param.
  3. Ensure the client always sets namespaceId for skill searches.

Example fix

// before
GET /skills/search?q=deploy

// after
GET /skills/search?namespaceId=public&q=deploy
Defensive patterns

Strategy: validation

Validate before calling

if (StringUtils.isBlank(namespaceId)) {
    throw new IllegalArgumentException("namespaceId is required for skill search");
}

Prevention

When it happens

Trigger: Calling the skill search endpoint without ?namespaceId= (or with an empty value).

Common situations: Assuming the server defaults the namespace; a client that does not propagate the tenant for search; URL building that drops the empty param.

Related errors


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/8f001a7eab6516c1. Report an issue: GitHub.