alibaba/nacos · error · NacosApiException

10000

10000

Error message

Required parameter 'description' type String is not present

What it means

Thrown by PromptDescriptionUpdateForm.validate() when description is blank. This form extends PromptForm (so super.validate() first checks promptKey). It guards the prompt description-update endpoint. Maps to code 10000 (PARAMETER_MISSING), HTTP 400.

Source

Thrown at ai/src/main/java/com/alibaba/nacos/ai/form/prompt/PromptDescriptionUpdateForm.java:42

import java.io.Serial;

/**
 * Prompt description update form.
 *
 * @author nacos
 */
public class PromptDescriptionUpdateForm extends PromptForm {
    
    @Serial
    private static final long serialVersionUID = 1L;
    
    private String description;
    
    @Override
    public void validate() throws NacosApiException {
        super.validate();
        if (StringUtils.isBlank(description)) {
            throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,
                "Required parameter 'description' type String is not present");
        }
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
}

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Provide a non-blank description in the request.
  2. If you want to clear the description, check whether a separate endpoint/empty-string handling exists — this validator rejects blank.
  3. Ensure promptKey is also present (super.validate() checks it first).

Example fix

// before
description=
// after
description=Updated prompt description text
Defensive patterns

Strategy: validation

Validate before calling

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

Type guard

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

Try / catch

catch (NacosApiException e) {
    if (e.getErrCode() == 10000 && e.getMessage().contains("description")) { /* add text */ }
}

Prevention

When it happens

Trigger: Calling the prompt description update endpoint (PromptAdminController.updateDescription) with promptKey set but description omitted or empty.

Common situations: User clears the description field and saves; a migration script sets description to null; UI sends the old value under a different field name.

Related errors


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