alibaba/nacos · error · NacosApiException
10000
10000
Error message
Required parameter 'label' type String is not present
What it means
Thrown by PromptLabelBindForm.validate() when label is blank. This form extends PromptForm (promptKey checked first via super.validate()). It guards the label-bind endpoint, which additionally requires version. Maps to code 10000 (PARAMETER_MISSING), HTTP 400.
Source
Thrown at ai/src/main/java/com/alibaba/nacos/ai/form/prompt/PromptLabelBindForm.java:39
import com.alibaba.nacos.api.model.v2.ErrorCode;
import com.alibaba.nacos.common.utils.StringUtils;
/**
* Prompt label bind form.
*
* @author nacos
*/
public class PromptLabelBindForm extends PromptForm {
private String label;
private String version;
@Override
public void validate() throws NacosApiException {
super.validate();
if (StringUtils.isBlank(label)) {
throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,
"Required parameter 'label' type String is not present");
}
if (StringUtils.isBlank(version)) {
throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,
"Required parameter 'version' type String is not present");
}
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getVersion() {
return version;View on GitHub (pinned to 9b989acdf1)
Solutions
- Provide a non-blank label to bind.
- Also provide version (checked immediately after label).
- Note 'latest' is server-managed; bind custom labels only.
Example fix
// before promptKey=myPrompt&version=1.0.0 // after promptKey=myPrompt&version=1.0.0&label=stable
Defensive patterns
Strategy: validation
Validate before calling
if (label == null || label.trim().isEmpty()) {
throw new IllegalArgumentException("label required");
} Type guard
static boolean hasLabel(String l) {
return l != null && !l.trim().isEmpty();
} Try / catch
catch (NacosApiException e) {
if (e.getErrCode() == 10000 && e.getMessage().contains("'label'")) { /* supply label */ }
} Prevention
- Send label and version together on bind.
- Avoid the reserved 'latest' label.
When it happens
Trigger: Calling POST to bind a label (PromptAdminController.bindLabel) with promptKey set but label omitted.
Common situations: Client binds a label by id but sends the wrong field name; UI submits before a label is chosen; 'latest' reserved label handling differs from custom labels.
Related errors
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/78a0e7bede1d4a91.
Report an issue: GitHub.