{"record":{"id":"b3f361c8ddf9d68a","repo":"alibaba/nacos","slug":"10000-b3f361","errorCode":"10000","errorMessage":"Required parameter 'description' type String is not present","messagePattern":"Required parameter 'description' type String is not present","errorType":"validation","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"ai/src/main/java/com/alibaba/nacos/ai/form/prompt/PromptDescriptionUpdateForm.java","lineNumber":42,"sourceCode":"import java.io.Serial;\n\n/**\n * Prompt description update form.\n *\n * @author nacos\n */\npublic class PromptDescriptionUpdateForm extends PromptForm {\n    \n    @Serial\n    private static final long serialVersionUID = 1L;\n    \n    private String description;\n    \n    @Override\n    public void validate() throws NacosApiException {\n        super.validate();\n        if (StringUtils.isBlank(description)) {\n            throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,\n                \"Required parameter 'description' type String is not present\");\n        }\n    }\n    \n    public String getDescription() {\n        return description;\n    }\n    \n    public void setDescription(String description) {\n        this.description = description;\n    }\n}\n","sourceCodeStart":24,"sourceCodeEnd":55,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai/src/main/java/com/alibaba/nacos/ai/form/prompt/PromptDescriptionUpdateForm.java#L24-L55","documentation":"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.","triggerScenarios":"Calling the prompt description update endpoint (PromptAdminController.updateDescription) with promptKey set but description omitted or empty.","commonSituations":"User clears the description field and saves; a migration script sets description to null; UI sends the old value under a different field name.","solutions":["Provide a non-blank description in the request.","If you want to clear the description, check whether a separate endpoint/empty-string handling exists — this validator rejects blank.","Ensure promptKey is also present (super.validate() checks it first)."],"exampleFix":"// before\ndescription=\n// after\ndescription=Updated prompt description text","handlingStrategy":"validation","validationCode":"if (description == null || description.trim().isEmpty()) {\n    throw new IllegalArgumentException(\"description required\");\n}","typeGuard":"static boolean hasDescription(String d) {\n    return d != null && !d.trim().isEmpty();\n}","tryCatchPattern":"catch (NacosApiException e) {\n    if (e.getErrCode() == 10000 && e.getMessage().contains(\"description\")) { /* add text */ }\n}","preventionTips":["Disable save when description is blank.","Note blank is rejected — there is no clear-to-empty path on this endpoint."],"tags":["validation","ai","prompt","parameter","http","api"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}