{"record":{"id":"69c504d2c43502c3","repo":"alibaba/nacos","slug":"20002-69c504","errorCode":"20002","errorMessage":"Required parameter 'resourceType' is missing","messagePattern":"Required parameter 'resourceType' is missing","errorType":"validation","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"ai/src/main/java/com/alibaba/nacos/ai/form/pipeline/PipelineListForm.java","lineNumber":48,"sourceCode":" * @since 3.2.0\n */\npublic class PipelineListForm implements NacosForm {\n    \n    @Serial\n    private static final long serialVersionUID = 1L;\n    \n    private String resourceType;\n    \n    private String resourceName;\n    \n    private String namespaceId;\n    \n    private String version;\n    \n    @Override\n    public void validate() throws NacosApiException {\n        if (StringUtils.isBlank(resourceType)) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_VALIDATE_ERROR,\n                \"Required parameter 'resourceType' is missing\");\n        }\n    }\n    \n    public String getResourceType() {\n        return resourceType;\n    }\n    \n    public void setResourceType(String resourceType) {\n        this.resourceType = resourceType;\n    }\n    \n    public String getResourceName() {\n        return resourceName;\n    }\n    \n    public void setResourceName(String resourceName) {","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai/src/main/java/com/alibaba/nacos/ai/form/pipeline/PipelineListForm.java#L30-L66","documentation":"Thrown by PipelineListForm.validate() when resourceType is blank. This guards the pipeline-execution listing endpoint; resourceType scopes the query (e.g. MCP, PROMPT, AGENTSPEC). Uses code 20002 (PARAMETER_VALIDATE_ERROR), HTTP 400. The form also accepts optional resourceName, namespaceId, version.","triggerScenarios":"Calling GET /v3/admin/ai/pipelines/list without the resourceType query parameter.","commonSituations":"Client builds the list query from an empty filter state; resourceType sourced from a dropdown that defaulted to blank; refactoring dropped the field.","solutions":["Add resourceType to the GET request (a known AI resource type).","Pair it with resourceName to narrow results.","If listing all pipelines is needed, confirm whether the API supports a wildcard — otherwise scope by resourceType."],"exampleFix":"// before\ncurl 'http://host/v3/admin/ai/pipelines/list'\n// after\ncurl 'http://host/v3/admin/ai/pipelines/list?resourceType=MCP&resourceName=myMcp'","handlingStrategy":"validation","validationCode":"if (resourceType == null || resourceType.trim().isEmpty()) {\n    throw new IllegalArgumentException(\"resourceType required\");\n}","typeGuard":"static boolean hasResourceType(String t) {\n    return t != null && !t.trim().isEmpty();\n}","tryCatchPattern":"catch (NacosApiException e) {\n    if (e.getErrCode() == 20002 && e.getMessage().contains(\"resourceType\")) { /* supply type */ }\n}","preventionTips":["Require a resourceType selection before list queries.","Pair with resourceName to narrow results."],"tags":["validation","ai","pipeline","parameter","http","api"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}