alibaba/nacos · error · NacosApiException
RESOURCE_NOT_FOUND
RESOURCE_NOT_FOUND
Error message
Pipeline execution not found: {pipelineId} What it means
Thrown by PipelineQueryService.getPipeline when repository.findById(pipelineId) returns null — no pipeline execution record exists for the given ID. Pipelines are execution records (not definitions), so the ID must reference a concrete run that was created and persisted. Reported as RESOURCE_NOT_FOUND with HTTP 404 (uses HttpStatus.NOT_FOUND.value()).
Source
Thrown at ai/src/main/java/com/alibaba/nacos/ai/service/pipeline/PipelineQueryService.java:55
public class PipelineQueryService {
private final PipelineExecutionRepository repository;
public PipelineQueryService(PipelineExecutionRepository repository) {
this.repository = repository;
}
/**
* Get a single pipeline execution by ID.
*
* @param pipelineId the execution ID
* @return the pipeline execution
* @throws NacosException if not found
*/
public PipelineExecution getPipeline(String pipelineId) throws NacosException {
PipelineExecution execution = repository.findById(pipelineId);
if (execution == null) {
throw new NacosApiException(HttpStatus.NOT_FOUND.value(), ErrorCode.RESOURCE_NOT_FOUND,
"Pipeline execution not found: " + pipelineId);
}
return execution;
}
/**
* List pipeline executions with pagination.
*
* @param resourceType the resource type (required)
* @param resourceName the resource name (optional)
* @param namespaceId the namespace ID (optional)
* @param version the version (optional)
* @param pageNo the page number (1-based)
* @param pageSize the page size
* @return paginated results
* @throws NacosException if query fails
*/
public Page<PipelineExecution> listPipelines(String resourceType, String resourceName,View on GitHub (pinned to 9b989acdf1)
Solutions
- Use the listPipelines endpoint to find a valid execution ID for the resource.
- Start a new pipeline execution to obtain a fresh ID.
- Verify the repository backend (in-memory vs persistent) matches your durability expectations; configure persistence if executions must survive restarts.
- Handle the 404 in the client and surface a 'not found / expired' message to the user.
Example fix
// before
exec = pipelineQueryService.getPipeline("old-or-invalid-id"); // 404
// after
Page<PipelineExecution> page = pipelineQueryService.listPipelines(rt, rn, ns, ver, 1, 20);
if (page.getPageItems().isEmpty()) {
exec = pipelineService.start(rt, rn, ns, ver); // create a new run
} else {
exec = pipelineQueryService.getPipeline(page.getPageItems().get(0).getId());
} Defensive patterns
Strategy: validation
Validate before calling
// Verify the execution ID exists before fetching
if (pipelineId == null || pipelineId.isBlank()
|| !pipelineRepository.existsById(pipelineId)) {
throw new IllegalArgumentException("Unknown pipelineId: " + pipelineId);
}
exec = pipelineQueryService.getPipeline(pipelineId); Try / catch
try {
exec = pipelineQueryService.getPipeline(id);
} catch (NacosApiException e) {
if (e.getErrCode() == HttpStatus.NOT_FOUND.value()) {
// list recent executions or start a new one
Page<PipelineExecution> p = pipelineQueryService.listPipelines(rt, rn, ns, ver, 1, 1);
exec = p.getPageItems().isEmpty() ? startNew(rt, rn, ns, ver)
: pipelineQueryService.getPipeline(p.getPageItems().get(0).getId());
} else { throw e; }
} Prevention
- Use IDs returned by start/list endpoints; do not construct IDs manually.
- Configure a persistent repository if executions must survive restarts.
- Expire/clear client references to executions after retention cleanup.
When it happens
Trigger: GET /pipeline/{pipelineId} with an ID that was never created; an ID from a deleted/expired execution; a malformed or truncated ID; referencing an execution from a different cluster/namespace store.
Common situations: Client polling an old execution ID after retention cleanup; typo or copy error in the ID; execution stored in-memory (volatile repository) and lost on restart; cross-environment ID that does not exist locally.
Related errors
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/b4f38f7c9e00ef41.
Report an issue: GitHub.