alibaba/nacos · error · NacosApiException

10000

10000

Error message

Required parameter 'dataId' type String is not present

What it means

Thrown by ConfigForm.validate() when dataId is blank. Returns HTTP 400 code 10000 (PARAMETER_MISSING). dataId is the primary identifier of a configuration item and is mandatory for nearly all config operations. This is the base form validator inherited by ConfigFormV3.

Source

Thrown at config/src/main/java/com/alibaba/nacos/config/server/model/form/ConfigForm.java:255

        return grayVersion;
    }
    
    public void setGrayVersion(String grayVersion) {
        this.grayVersion = grayVersion;
    }
    
    public int getGrayPriority() {
        return grayPriority;
    }
    
    public void setGrayPriority(int grayPriority) {
        this.grayPriority = grayPriority;
    }
    
    @Override
    public void validate() throws NacosApiException {
        if (StringUtils.isBlank(dataId)) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
                "Required parameter 'dataId' type String is not present");
        } else if (StringUtils.isBlank(group)) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
                "Required parameter 'group' type String is not present");
        }
    }
    
    /**
     * Validate form parameter and include validate `content` parameters.
     *
     * @throws NacosApiException NacosApiException
     */
    public void validateWithContent() throws NacosApiException {
        validate();
        if (StringUtils.isBlank(content)) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
                "Required parameter 'content' type String is not present");
        }

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Ensure dataId is a non-blank string in the request body or query string.
  2. Validate dataId client-side before calling the API.
  3. Check that the form field name matches 'dataId' exactly.

Example fix

// before
POST /v3/admin/cs/config  { "group":"G", "content":"..." } // no dataId
// after
POST /v3/admin/cs/config  { "dataId":"app.yml", "group":"G", "content":"..." }
Defensive patterns

Strategy: validation

Validate before calling

if (StringUtils.isBlank(dataId)) {
    throw new IllegalArgumentException("dataId is required");
}

Try / catch

try { configApi.publish(form); }
catch (NacosApiException e) {
    if (e.getErrCode() == ErrorCode.PARAMETER_MISSING.getCode())
        { /* supply dataId */ } else throw e;
}

Prevention

When it happens

Trigger: Any config API (publish, query, delete, history) that calls configForm.validate() with dataId omitted or empty. Common in POST/GET requests missing the dataId param.

Common situations: Form binding failure where dataId is not submitted; URL-encoded request missing dataId; typo in the parameter name.

Related errors


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