alibaba/nacos · error · NacosApiException

20002

20002

Error message

Required parameter 'pipelineId' is missing

What it means

Thrown by PipelineDetailForm.validate() when pipelineId is blank. This guards the pipeline execution detail query. Uses error code 20002 (PARAMETER_VALIDATE_ERROR) rather than the 10000 (PARAMETER_MISSING) used by most missing-field guards in this module — a minor inconsistency worth noting. HTTP 400.

Source

Thrown at ai/src/main/java/com/alibaba/nacos/ai/form/pipeline/PipelineDetailForm.java:41

import java.io.Serial;

/**
 * Pipeline execution detail query form for {@code GET .../detail}.
 *
 * @author nacos
 */
public class PipelineDetailForm implements NacosForm {
    
    @Serial
    private static final long serialVersionUID = 1L;
    
    private String pipelineId;
    
    @Override
    public void validate() throws NacosApiException {
        if (StringUtils.isBlank(pipelineId)) {
            throw new NacosApiException(NacosApiException.INVALID_PARAM,
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "Required parameter 'pipelineId' is missing");
        }
    }
    
    public String getPipelineId() {
        return pipelineId;
    }
    
    public void setPipelineId(String pipelineId) {
        this.pipelineId = pipelineId;
    }
}

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Add the pipelineId query parameter to the GET request.
  2. If you only have resourceType/resourceName, use GET /v3/admin/ai/pipelines/list instead to find the id.
  3. Ensure the id is the execution pipelineId, not the resource name.

Example fix

// before
curl 'http://host/v3/admin/ai/pipelines/detail'
// after
curl 'http://host/v3/admin/ai/pipelines/detail?pipelineId=pipe-123'
Defensive patterns

Strategy: validation

Validate before calling

if (pipelineId == null || pipelineId.trim().isEmpty()) {
    throw new IllegalArgumentException("pipelineId required");
}

Type guard

static boolean hasPipelineId(String id) {
    return id != null && !id.trim().isEmpty();
}

Try / catch

catch (NacosApiException e) {
    if (e.getErrCode() == 20002 && e.getMessage().contains("pipelineId")) { /* supply id */ }
}

Prevention

When it happens

Trigger: Calling GET /v3/admin/ai/pipelines/detail without the pipelineId query parameter.

Common situations: Client navigates to a detail page before a pipeline row is selected; a deep-link missing the id; id passed as a path segment instead of the query param.

Related errors


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