alibaba/nacos · warning · NacosApiException

PARAMETER_VALIDATE_ERROR

PARAMETER_VALIDATE_ERROR

Error message

Request parameter 'search' should be 'accurate' or 'blur'.

What it means

PromptListForm.validate() guards the prompt list query's optional `search` parameter. When `search` is non-blank it must case-insensitively equal "accurate" (exact match) or "blur" (substring match) — the only two modes the underlying query supports. Any other value means the caller has asked for an undefined search behavior, so the server rejects it with PARAMETER_VALIDATE_ERROR before executing the query.

Source

Thrown at ai/src/main/java/com/alibaba/nacos/ai/form/prompt/PromptListForm.java:73

    
    /**
     * Page number (1-based).
     */
    private int pageNo = 1;
    
    /**
     * Page size.
     */
    private int pageSize = 10;
    
    @Override
    public void validate() throws NacosApiException {
        fillDefaultNamespaceId();
        
        if (StringUtils.isNotBlank(search)
            && !Constants.Prompt.SEARCH_ACCURATE.equalsIgnoreCase(search)
            && !Constants.Prompt.SEARCH_BLUR.equalsIgnoreCase(search)) {
            throw new NacosApiException(NacosApiException.INVALID_PARAM,
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "Request parameter 'search' should be 'accurate' or 'blur'.");
        }
        
        if (pageNo < 1) {
            pageNo = 1;
        }
        if (pageSize < 1) {
            pageSize = 10;
        }
        if (pageSize > MAX_PAGE_SIZE) {
            pageSize = MAX_PAGE_SIZE;
        }
    }
    
    private void fillDefaultNamespaceId() {
        if (StringUtils.isEmpty(namespaceId)) {
            namespaceId = Constants.Prompt.PROMPT_DEFAULT_NAMESPACE;

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Set `search=accurate` for exact match, or `search=blur` for substring/fuzzy match (case-insensitive).
  2. Omit the `search` parameter entirely if you don't need to filter — the default behavior applies.
  3. If you intended exact matching but used "exact", switch to "accurate"; if you intended fuzzy matching but used "fuzzy", switch to "blur".

Example fix

// before
GET /v3/admin/ai/prompts/list?search=fuzzy&promptKey=hello
// after
GET /v3/admin/ai/prompts/list?search=blur&promptKey=hello
Defensive patterns

Strategy: validation

Validate before calling

// Java client, before calling the prompt list API
String search = form.getSearch();
if (search != null && !search.isBlank()
    && !"accurate".equalsIgnoreCase(search)
    && !"blur".equalsIgnoreCase(search)) {
    throw new IllegalArgumentException("search must be 'accurate', 'blur', or null");
}

Type guard

// TypeScript (frontend) before sending
const isValidSearch = (s: string | null | undefined): boolean =>
  s == null || s === "" ||
  "accurate".equalsIgnoreCase?.(s) ||
  ["accurate","blur"].includes(s.toLowerCase());

Try / catch

try {
    PromptListForm form = new PromptListForm();
    form.setSearch(search);
    form.validate(); // throws NacosApiException
} catch (NacosApiException e) {
    if (e.getDetail() == ErrorCode.PARAMETER_VALIDATE_ERROR) {
        // surface to UI: invalid search mode
    }
}

Prevention

When it happens

Trigger: Calling the prompt list API (e.g. GET /v3/admin/ai/prompts/list or the SDK equivalent) with search set to a value other than accurate/blur, such as `search=fuzzy`, `search=partial`, `search=contains`, or `search=exact`. Leaving `search` null/blank does NOT trigger it — the parameter is optional.

Common situations: Developers used to other APIs that use "fuzzy" as the fuzzy-search keyword; UI dropdowns that emit "exact" instead of "accurate"; copy-pasting a query param from a different Nacos resource type whose naming differs; typos like "accuate".

Related errors


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